[MPlayer-dev-eng] [PATCH] lavf demuxer timebase fix?

Rich Felker dalias at aerifal.cx
Sun May 1 03:03:47 CEST 2005


On Sat, Apr 30, 2005 at 09:02:29PM -0400, Rich Felker wrote:
> would someone check and see if this looks ok before i commit it?
> (see latest commits on ffmpeg-cvslog)
> 
> rich

it would help if i actually tried compiling.. here's attempt 2..

rich

-------------- next part --------------
Index: libmpdemux/demux_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_lavf.c,v
retrieving revision 1.14
diff -u -r1.14 demux_lavf.c
--- libmpdemux/demux_lavf.c	25 Mar 2005 22:47:09 -0000	1.14
+++ libmpdemux/demux_lavf.c	1 May 2005 01:02:52 -0000
@@ -236,8 +236,13 @@
             sh_video->bih= bih;
             sh_video->disp_w= codec->width;
             sh_video->disp_h= codec->height;
+#if (LIBAVFORMAT_BUILD >= 4624)
+            sh_video->video.dwRate= codec->time_base.den;
+            sh_video->video.dwScale= codec->time_base.num;
+#else
             sh_video->video.dwRate= codec->frame_rate;
             sh_video->video.dwScale= codec->frame_rate_base;
+#endif
             sh_video->fps=(float)sh_video->video.dwRate/(float)sh_video->video.dwScale;
             sh_video->frametime=(float)sh_video->video.dwScale/(float)sh_video->video.dwRate;
             sh_video->format = bih->biCompression;


More information about the MPlayer-dev-eng mailing list