[vlc-commits] aout_OutputNextBuffer: do not dequeue when paused
Rémi Denis-Courmont
git at videolan.org
Thu Aug 4 21:12:17 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 4 21:25:53 2011 +0300| [87908cfda5514937773e9fe18dd82ead0499f9da] | committer: Rémi Denis-Courmont
aout_OutputNextBuffer: do not dequeue when paused
This greatly reduces the latency when pausing a legacy audio output.
Unfortunately, the audio output will keep polling for buffers though.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=87908cfda5514937773e9fe18dd82ead0499f9da
---
src/audio_output/output.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 72a9a7f..7fdb531 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -613,10 +613,12 @@ aout_buffer_t * aout_OutputNextBuffer( audio_output_t * p_aout,
{
aout_packet_t *p = aout_packet (p_aout);
aout_fifo_t *p_fifo = &p->fifo;
- aout_buffer_t * p_buffer;
+ aout_buffer_t *p_buffer = NULL;
mtime_t now = mdate();
vlc_mutex_lock( &p->lock );
+ if( p->pause_date != VLC_TS_INVALID )
+ goto out;
/* Drop the audio sample if the audio output is really late.
* In the case of b_can_sleek, we don't use a resampler so we need to be
More information about the vlc-commits
mailing list