[vlc-commits] Flush PulseAudio stream on overflow (fix #5464)
Rémi Denis-Courmont
git at videolan.org
Tue Oct 18 18:00:31 CEST 2011
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Oct 18 18:55:16 2011 +0300| [70940f34b62c7d5c7f5558f4974ba34f4342824c] | committer: Rémi Denis-Courmont
Flush PulseAudio stream on overflow (fix #5464)
(cherry picked from commit 836d970806b986949b9b2f847d16cf73f8bdadca)
Conflicts:
modules/audio_output/pulse.c
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=70940f34b62c7d5c7f5558f4974ba34f4342824c
---
modules/audio_output/pulse.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index 18ee280..e1e330c 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -313,9 +313,13 @@ static void stream_moved_cb(pa_stream *s, void *userdata)
static void stream_overflow_cb(pa_stream *s, void *userdata)
{
aout_instance_t *aout = userdata;
+ pa_operation *op;
- msg_Err(aout, "overflow");
- (void) s;
+ msg_Err(aout, "overflow, flushing");
+ op = pa_stream_flush(s, NULL, NULL);
+ if (likely(op != NULL))
+ pa_operation_unref(op);
+ stream_reset_sync(s, aout);
}
static void stream_started_cb(pa_stream *s, void *userdata)
More information about the vlc-commits
mailing list