[rhythmbox] xfade: abandon buffering streams if we're already fading them out
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] xfade: abandon buffering streams if we're already fading them out
- Date: Sat, 15 Dec 2012 15:07:18 +0000 (UTC)
commit 6216a9cffeca590e98c0b8f93c67108ba3d973fc
Author: Jonathan Matthew <jonathan d14n org>
Date: Sat Dec 15 19:36:41 2012 +1000
xfade: abandon buffering streams if we're already fading them out
The fade out isn't going to work properly in this case no matter
what we do, and if we try playing the stream again later we might
forget we're trying to get rid of it.
backends/gstreamer/rb-player-gst-xfade.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/backends/gstreamer/rb-player-gst-xfade.c b/backends/gstreamer/rb-player-gst-xfade.c
index cdb0e24..0fd3750 100644
--- a/backends/gstreamer/rb-player-gst-xfade.c
+++ b/backends/gstreamer/rb-player-gst-xfade.c
@@ -1898,11 +1898,18 @@ rb_player_gst_xfade_bus_cb (GstBus *bus, GstMessage *message, RBPlayerGstXFade *
/* not sure */
break;
+ case FADING_OUT:
+ rb_debug ("fading out stream is buffering, abandoning it");
+ stream->state = PENDING_REMOVE;
+ schedule_stream_reap (player);
+ /* might need to remove it immediately to avoid stalling adder? */
+
+ /* since we're abandoning this stream, pretend it's not buffering */
+ progress = 100;
+ break;
default:
- if (stream->adder_pad != NULL) {
- rb_debug ("stream buffering, stopping playback");
- unlink_and_block_stream (stream);
- }
+ rb_debug ("stream buffering, stopping playback");
+ unlink_and_block_stream (stream);
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]