Skip to content

Commit

Permalink
Fix frame rate detection for RM video files with patch used by XBMC.
Browse files Browse the repository at this point in the history
  • Loading branch information
tralph committed Jan 11, 2011
1 parent c6c50df commit 09800d6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mythtv/external/FFmpeg/libavformat/rmdec.c
Expand Up @@ -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;
Expand Down

0 comments on commit 09800d6

Please sign in to comment.