[FFmpeg-devel] Fix get wrong frame rate with rm/rmvb files
Michael Niedermayer
michaelni
Sun Nov 15 00:15:32 CET 2009
On Sat, Nov 14, 2009 at 06:07:53PM +0000, Joakim Plate wrote:
> Hi,
>
> Our patch submitter updated the patch in our trac. I'm inlining it here as i'm
> posting from gmane. I can't tell if it's valid or not. His comment was "change
> the patch to use 32bit pts"
>
> Index: xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/rmdec.c
> ===================================================================
> --- xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/rmdec.c (revision 24568)
> +++ xbmc/cores/dvdplayer/Codecs/ffmpeg/libavformat/rmdec.c (working copy)
>
> @@ -262,7 +262,7 @@
> if (rm_read_audio_stream_info(s, pb, st, rst, 0))
> return -1;
> } else {
> - int fps, fps2;
> + int fps, fps2, fps3;
> if (get_le32(pb) != MKTAG('V', 'I', 'D', 'O')) {
> fail1:
> av_log(st->codec, AV_LOG_ERROR, "Unsupported video codec\n");
> @@ -278,12 +278,12 @@
> 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 = CODEC_TYPE_VIDEO;
> get_be32(pb);
> fps2= get_be16(pb);
> - get_be16(pb);
> + fps3= get_be16(pb);
this likely should be get_be32() assuming this patch is correct
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091115/38e84f3a/attachment.pgp>
More information about the ffmpeg-devel
mailing list