comparison mpcommon.c @ 32865:25d2ef30d784

Avoid mixing declarations and code.
author reimar
date Tue, 22 Feb 2011 18:52:48 +0000
parents 674117ab7ce7
children 9acb64ec6484
comparison
equal deleted inserted replaced
32864:ccdfd500453c 32865:25d2ef30d784
464 } 464 }
465 465
466 /// Returns a_pts 466 /// Returns a_pts
467 double calc_a_pts(sh_audio_t *sh_audio, demux_stream_t *d_audio) 467 double calc_a_pts(sh_audio_t *sh_audio, demux_stream_t *d_audio)
468 { 468 {
469 double a_pts;
469 if(!sh_audio || !d_audio) 470 if(!sh_audio || !d_audio)
470 return MP_NOPTS_VALUE; 471 return MP_NOPTS_VALUE;
471 // first calculate the end pts of audio that has been output by decoder 472 // first calculate the end pts of audio that has been output by decoder
472 double a_pts = sh_audio->pts; 473 a_pts = sh_audio->pts;
473 if (a_pts != MP_NOPTS_VALUE) 474 if (a_pts != MP_NOPTS_VALUE)
474 // Good, decoder supports new way of calculating audio pts. 475 // Good, decoder supports new way of calculating audio pts.
475 // sh_audio->pts is the timestamp of the latest input packet with 476 // sh_audio->pts is the timestamp of the latest input packet with
476 // known pts that the decoder has decoded. sh_audio->pts_bytes is 477 // known pts that the decoder has decoded. sh_audio->pts_bytes is
477 // the amount of bytes the decoder has written after that timestamp. 478 // the amount of bytes the decoder has written after that timestamp.