summaryrefslogtreecommitdiffstats
path: root/demux_avi.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-21 00:10:09 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-07-21 00:10:09 +0000
commitba4c083a27102f1904bfffa627508554d49a7d67 (patch)
treeb89c95ac6d9a1173daa29ec1ad5b0db9d7d8ce3e /demux_avi.c
parent9e522e286b3f3eb4fad81a572577a9c70beb56fc (diff)
downloadmpv-ba4c083a27102f1904bfffa627508554d49a7d67.tar.bz2
mpv-ba4c083a27102f1904bfffa627508554d49a7d67.tar.xz
video pts calculation precision fixed
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1369 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'demux_avi.c')
-rw-r--r--demux_avi.c10
1 files changed, 9 insertions, 1 deletions
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;
}