[MPlayer-cvslog] CVS: main/libmpdemux demux_lavf.c,1.14,1.15
Michael Niedermayer CVS
syncmail at mplayerhq.hu
Sun May 1 04:04:00 CEST 2005
CVS change done by Michael Niedermayer CVS
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv20359
Modified Files:
demux_lavf.c
Log Message:
LIBAVFORMAT_BUILD >= 4624
Index: demux_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_lavf.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- demux_lavf.c 25 Mar 2005 22:47:09 -0000 1.14
+++ demux_lavf.c 1 May 2005 02:03:58 -0000 1.15
@@ -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;
@@ -339,8 +344,13 @@
}
if(pkt.pts != AV_NOPTS_VALUE){
+#if LIBAVFORMAT_BUILD >= 4624
+ dp->pts=pkt.pts * av_q2d(priv->avfc->streams[id]->time_base);
+ priv->last_pts= dp->pts * AV_TIME_BASE;
+#else
priv->last_pts= pkt.pts;
dp->pts=pkt.pts / (float)AV_TIME_BASE;
+#endif
}
dp->pos=demux->filepos;
dp->flags= !!(pkt.flags&PKT_FLAG_KEY);
More information about the MPlayer-cvslog
mailing list