diff options
author | aaron <aaronrules5alt@gmail.com> | 2024-07-21 11:35:42 +1000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2024-07-23 06:40:30 +1000 |
commit | 53d0f9afb46ac811269252c9e3be000fc7c3b2cc (patch) | |
tree | 63e6cdd8e505af739487c55e3b0b8b322a9c1559 /libavformat/electronicarts.c | |
parent | f44353cfb65ef9d54febbc552cacea52675bb8d1 (diff) | |
download | ffmpeg-53d0f9afb46ac811269252c9e3be000fc7c3b2cc.tar.gz |
avcodec/electronicarts: decode framerate
Reviewed-by: Peter Ross <pross@xvid.org>
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r-- | libavformat/electronicarts.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index f7f6fd4cab..04acf3a409 100644 --- a/libavformat/electronicarts.c +++ b/libavformat/electronicarts.c @@ -198,6 +198,10 @@ static int process_audio_header_elements(AVFormatContext *s) av_log(s, AV_LOG_DEBUG, "end of header block reached\n"); in_header = 0; break; + case 0x1B: + ea->video.time_base = (AVRational) {1, read_arbitrary(pb)}; + av_log(s, AV_LOG_DEBUG, "Setting framerate to %u\n", ea->video.time_base.den); + break; default: av_log(s, AV_LOG_DEBUG, "header element 0x%02x set to 0x%08"PRIx32"\n", @@ -325,7 +329,8 @@ static void process_video_header_mdec(AVFormatContext *s, VideoProperties *video avio_skip(pb, 4); video->width = avio_rl16(pb); video->height = avio_rl16(pb); - video->time_base = (AVRational) { 1, 15 }; + if (!video->time_base.num) + video->time_base = (AVRational) { 1, 15 }; video->codec = AV_CODEC_ID_MDEC; } @@ -427,12 +432,14 @@ static int process_ea_header(AVFormatContext *s) case pQGT_TAG: case TGQs_TAG: ea->video.codec = AV_CODEC_ID_TGQ; - ea->video.time_base = (AVRational) { 1, 15 }; + if (!ea->video.time_base.num) + ea->video.time_base = (AVRational) { 1, 15 }; break; case pIQT_TAG: ea->video.codec = AV_CODEC_ID_TQI; - ea->video.time_base = (AVRational) { 1, 15 }; + if (!ea->video.time_base.num) + ea->video.time_base = (AVRational) { 1, 15 }; break; case MADk_TAG: |