aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2011-08-14 20:21:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-08-15 03:49:07 +0200
commit10b7b4a6a1585a7c46487b00594798cdd92eed37 (patch)
treef076ab577eb3db06ef0acfff2e789cb730231f61 /configure
parentabf6b0d1ea231cc52008e9eaa1d2902442e1cbba (diff)
downloadffmpeg-10b7b4a6a1585a7c46487b00594798cdd92eed37.tar.gz
ffplay: more precise audio clock based on current time
Since SDL has no audio buffer fullness info, one can get a much precise audio clock based on the last time of the audio callback and the elapsed time since. To achieve this I introduced the audio_current_pts and audio_current_pts_drift variables (similar to video_current_pts and video_current_pts_drift) and calculate them in the end of the audio callback, when VideoState->audio_clock is already updated. The reference time I use is from the start of the audio callback, because this way the amount of time used for audio decoding is not interfereing with calculation. I also replaced the audio_write_get_buf_size function with a calculated variable because when the audio frame decoding is in progress audio_buf_size and audio_buf_index are not stable, so using them from other threads are not a good idea. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions