Mercurial > mplayer.hg
comparison demux_avi.c @ 1409:65058a94df3b
video pts calculation fixed (Desperado-trailer.avi)
author | arpi |
---|---|
date | Sun, 29 Jul 2001 01:28:07 +0000 |
parents | faee296c7c9a |
children | ea0a0b9e6fbc |
comparison
equal
deleted
inserted
replaced
1408:71ad3e1ba014 | 1409:65058a94df3b |
---|---|
66 | 66 |
67 if(ds==demux->audio){ | 67 if(ds==demux->audio){ |
68 pts=avi_audio_pts; | 68 pts=avi_audio_pts; |
69 avi_audio_pts=0; | 69 avi_audio_pts=0; |
70 } else | 70 } else |
71 if(ds && ds==demux->video){ | 71 if(ds==demux->video){ |
72 // video | 72 // video |
73 if(skip_video_frames>0){ | 73 if(skip_video_frames>0){ |
74 // drop frame (seeking) | 74 // drop frame (seeking) |
75 --skip_video_frames; | 75 --skip_video_frames; |
76 ds=NULL; | 76 ds=NULL; |
83 //avi_video_pts+=((sh_video_t*)ds->sh)->frametime; | 83 //avi_video_pts+=((sh_video_t*)ds->sh)->frametime; |
84 // FIXME!!! | 84 // FIXME!!! |
85 #if 1 | 85 #if 1 |
86 // printf("ds=0x%X\n",ds); | 86 // printf("ds=0x%X\n",ds); |
87 // printf("packno=%d\n",ds->pack_no); | 87 // printf("packno=%d\n",ds->pack_no); |
88 avi_video_pts = demux->video->pack_no * | 88 // printf("### pack_no=%d\n",demux->video->pack_no+demux->video->packs); |
89 avi_video_pts = (demux->video->pack_no+demux->video->packs) * | |
89 (float)((sh_video_t*)demux->video->sh)->video.dwScale / | 90 (float)((sh_video_t*)demux->video->sh)->video.dwScale / |
90 (float)((sh_video_t*)demux->video->sh)->video.dwRate; | 91 (float)((sh_video_t*)demux->video->sh)->video.dwRate; |
91 #else | 92 #else |
92 avi_video_pts+=(float)((sh_video_t*)(demux->video->sh))->video.dwScale/(float)((sh_video_t*)(demux->video->sh))->video.dwRate; | 93 avi_video_pts+=(float)((sh_video_t*)(demux->video->sh))->video.dwScale/(float)((sh_video_t*)(demux->video->sh))->video.dwRate; |
93 // avi_video_pts+=avi_video_ftime; | 94 // avi_video_pts+=avi_video_ftime; |