[MPlayer-G2-dev] CVS: g2/audio dec_audio.c,1.1.1.1,1.2
Arpi of Ize
syncmail at mplayerhq.hu
Sun Feb 22 17:19:09 CET 2004
CVS change done by Arpi of Ize
Update of /cvsroot/mplayer/g2/audio
In directory mail:/var2/tmp/cvs-serv28061/audio
Modified Files:
dec_audio.c
Log Message:
- demuxer: changed PTS handling, export native PTS (based on rate_m/rate_d)
instead of scaled up by rate_m
- demux_avi: fixed nobps sync mode, when video chunkc come before audio ones
- demux_mpg: div native pts by 4, to fit 33 bits pts into 31 bits (signed int)
Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/g2/audio/dec_audio.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dec_audio.c 31 Jan 2004 20:16:18 -0000 1.1.1.1
+++ dec_audio.c 22 Feb 2004 16:19:07 -0000 1.2
@@ -417,7 +417,8 @@
float d=(sh_audio->a_in_buffer_len)/(float)sh_audio->i_bps;
float d2=(sh_audio->ds->flags&DEMUX_STREAM_FLAG_PTS_FOR_BLOCK) ? 0.0 :
(dl2/(float)sh_audio->i_bps);
- sh_audio->pts=(double)sh_audio->ds->pts/(double)sh_audio->ds->rate_m + d2 - d;
+ sh_audio->pts=(double)sh_audio->ds->pts*(double)sh_audio->ds->rate_d/(double)sh_audio->ds->rate_m + d2 - d;
+// printf("ZZZ a_pts=%8.8f\n",(float)sh_audio->pts);
mp_msg(MSGT_AVSYNC,MSGL_DBG2,"dec_audio: a_pts=%8.3f+%5.3f-%5.3f=%8.3f [+%d-%d] \n",
(float)sh_audio->ds->pts,d2,d,(float)sh_audio->pts, dl2, sh_audio->a_in_buffer_len);
sh_audio->ds->pts=0;
More information about the MPlayer-G2-dev
mailing list