From ba4c083a27102f1904bfffa627508554d49a7d67 Mon Sep 17 00:00:00 2001 From: arpi Date: Sat, 21 Jul 2001 00:10:09 +0000 Subject: video pts calculation precision fixed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1369 b3059339-0415-0410-9bf9-f77b7e298cf2 --- demux_avi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'demux_avi.c') diff --git a/demux_avi.c b/demux_avi.c index c3ea043bbc..abf4cbfa2f 100644 --- a/demux_avi.c +++ b/demux_avi.c @@ -68,7 +68,7 @@ static int demux_avi_read_packet(demuxer_t *demux,unsigned int id,unsigned int l pts=avi_audio_pts; avi_audio_pts=0; } else - if(ds==demux->video){ + if(ds && ds==demux->video){ // video if(skip_video_frames>0){ // drop frame (seeking) @@ -82,8 +82,16 @@ static int demux_avi_read_packet(demuxer_t *demux,unsigned int id,unsigned int l //avi_video_pts+=(float)avi_header.video.dwScale/(float)avi_header.video.dwRate; //avi_video_pts+=((sh_video_t*)ds->sh)->frametime; // FIXME!!! +#if 1 +// printf("ds=0x%X\n",ds); +// printf("packno=%d\n",ds->pack_no); + avi_video_pts = demux->video->pack_no * + (float)((sh_video_t*)demux->video->sh)->video.dwScale / + (float)((sh_video_t*)demux->video->sh)->video.dwRate; +#else avi_video_pts+=(float)((sh_video_t*)(demux->video->sh))->video.dwScale/(float)((sh_video_t*)(demux->video->sh))->video.dwRate; // avi_video_pts+=avi_video_ftime; +#endif avi_audio_pts=avi_video_pts; } -- cgit v1.2.3