diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-03-01 13:16:49 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-03-02 11:11:38 +0100 |
commit | e39400c3a817bde969e44f8ebfc7ebe4dae3f09f (patch) | |
tree | cd2514b09e226cf7d73511ee94e23a23dec43dd1 /libavformat/electronicarts.c | |
parent | 1bb3990b560e7ff7f46c06c14f959fe432e0b625 (diff) | |
download | ffmpeg-e39400c3a817bde969e44f8ebfc7ebe4dae3f09f.tar.gz |
electronicarts: parse the framerate for cmv video.
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r-- | libavformat/electronicarts.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index c7fbded6b3..a7beefd01b 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -283,6 +283,20 @@ static int process_video_header_vp6(AVFormatContext *s) return 1; } +static int process_video_header_cmv(AVFormatContext *s) +{ + EaDemuxContext *ea = s->priv_data; + int fps; + + avio_skip(s->pb, 10); + fps = avio_rl16(s->pb); + if (fps) + ea->time_base = (AVRational){1, fps}; + ea->video_codec = CODEC_ID_CMV; + + return 0; +} + /* * Process EA file header * Returns 1 if the EA file is valid and successfully opened, 0 otherwise @@ -330,8 +344,7 @@ static int process_ea_header(AVFormatContext *s) { break; case MVIh_TAG : - ea->video_codec = CODEC_ID_CMV; - ea->time_base = (AVRational){0,0}; + err = process_video_header_cmv(s); break; case kVGT_TAG: |