[rhythmbox] xfade: fix race in buffering handling
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] xfade: fix race in buffering handling
- Date: Tue, 25 Apr 2017 09:18:24 +0000 (UTC)
commit 96e1f98300941201ecfbe69b7f18c6c98cad4930
Author: Jonathan Matthew <jonathan d14n org>
Date: Tue Apr 25 19:16:43 2017 +1000
xfade: fix race in buffering handling
If a stream starts buffering, then finishes before the probe used to
unlink it fires, remove the probe and continue on. Improves streaming
from http servers.
backends/gstreamer/rb-player-gst-xfade.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/backends/gstreamer/rb-player-gst-xfade.c b/backends/gstreamer/rb-player-gst-xfade.c
index 3093905..cac4edf 100644
--- a/backends/gstreamer/rb-player-gst-xfade.c
+++ b/backends/gstreamer/rb-player-gst-xfade.c
@@ -1898,6 +1898,15 @@ rb_player_gst_xfade_bus_cb (GstBus *bus, GstMessage *message, RBPlayerGstXFade *
break;
default:
+ /* make sure we're not going to remove it */
+ g_mutex_lock (&stream->lock);
+ if (stream->block_probe_id != 0) {
+ gst_pad_remove_probe (stream->src_pad, stream->block_probe_id);
+ stream->block_probe_id = 0;
+ stream->needs_unlink = FALSE;
+ }
+ g_mutex_unlock (&stream->lock);
+
rb_debug ("stream %s is buffered, resuming", stream->uri);
link_and_unblock_stream (stream, &error);
if (error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]