summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Ralph <tralph@mythtv.org>2011-01-11 04:00:45 (GMT)
committer Taylor Ralph <tralph@mythtv.org>2011-01-11 04:04:56 (GMT)
commit09800d6abc5be917f6837bae1639ac1386db4a3a (patch)
tree64114242f30d427836d713339ea758ae0147ade9
parentc6c50dfbae133514a67fe44f75539ca6b6e12f6d (diff)
Fix frame rate detection for RM video files with patch used by XBMC.
http://article.gmane.org/gmane.comp.video.ffmpeg.devel/101003 Fixes #9420.
-rw-r--r--mythtv/external/FFmpeg/libavformat/rmdec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mythtv/external/FFmpeg/libavformat/rmdec.c b/mythtv/external/FFmpeg/libavformat/rmdec.c
index 436a7e0..b9061a2 100644
--- a/mythtv/external/FFmpeg/libavformat/rmdec.c
+++ b/mythtv/external/FFmpeg/libavformat/rmdec.c
@@ -294,18 +294,17 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, ByteIOContext *pb,
goto fail1;
st->codec->width = get_be16(pb);
st->codec->height = get_be16(pb);
- st->codec->time_base.num= 1;
+ st->codec->time_base.num= 1 << 16;
fps= get_be16(pb);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
get_be32(pb);
- fps2= get_be16(pb);
- get_be16(pb);
+ fps2= get_be32(pb);
if ((ret = rm_read_extradata(pb, st->codec, codec_data_size - (url_ftell(pb) - codec_pos))) < 0)
return ret;
// av_log(s, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2);
- st->codec->time_base.den = fps * st->codec->time_base.num;
+ st->codec->time_base.den = fps2;
//XXX: do we really need that?
switch(st->codec->extradata[4]>>4){
case 1: st->codec->codec_id = CODEC_ID_RV10; break;