# HG changeset patch # User reimar # Date 1298400768 0 # Node ID 25d2ef30d784ee143ad88782ddedef06d3f8566e # Parent ccdfd500453cd3c555578463d122b59b8fb06a17 Avoid mixing declarations and code. diff -r ccdfd500453c -r 25d2ef30d784 mpcommon.c --- a/mpcommon.c Tue Feb 22 18:24:04 2011 +0000 +++ b/mpcommon.c Tue Feb 22 18:52:48 2011 +0000 @@ -466,10 +466,11 @@ /// Returns a_pts double calc_a_pts(sh_audio_t *sh_audio, demux_stream_t *d_audio) { + double a_pts; if(!sh_audio || !d_audio) return MP_NOPTS_VALUE; // first calculate the end pts of audio that has been output by decoder - double a_pts = sh_audio->pts; + a_pts = sh_audio->pts; if (a_pts != MP_NOPTS_VALUE) // Good, decoder supports new way of calculating audio pts. // sh_audio->pts is the timestamp of the latest input packet with