changeset 1409:65058a94df3b

video pts calculation fixed (Desperado-trailer.avi)
author arpi
date Sun, 29 Jul 2001 01:28:07 +0000
parents 71ad3e1ba014
children eda16e490ae7
files demux_avi.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/demux_avi.c	Sun Jul 29 00:39:47 2001 +0000
+++ b/demux_avi.c	Sun Jul 29 01:28:07 2001 +0000
@@ -68,7 +68,7 @@
             pts=avi_audio_pts;
             avi_audio_pts=0;
   } else 
-  if(ds && ds==demux->video){
+  if(ds==demux->video){
      // video
      if(skip_video_frames>0){
        // drop frame (seeking)
@@ -85,7 +85,8 @@
 #if 1
 //       printf("ds=0x%X\n",ds);
 //       printf("packno=%d\n",ds->pack_no);
-       avi_video_pts = demux->video->pack_no *
+//    printf("### pack_no=%d\n",demux->video->pack_no+demux->video->packs);
+       avi_video_pts = (demux->video->pack_no+demux->video->packs) *
          (float)((sh_video_t*)demux->video->sh)->video.dwScale /
 	 (float)((sh_video_t*)demux->video->sh)->video.dwRate;
 #else