[rhythmbox] xfade: don't crash when handling raw streams
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] xfade: don't crash when handling raw streams
- Date: Tue, 22 Mar 2016 09:36:13 +0000 (UTC)
commit 1ccbbc33191f5158685a558fcf67fa5a56b89368
Author: Jonathan Matthew <jonathan d14n org>
Date: Tue Mar 22 19:22:53 2016 +1000
xfade: don't crash when handling raw streams
The check to determine whether the audio decoder in use is derived
from GstAudioDecoder failed horribly on raw streams, where there's only
one level of ghost pad and then the audio source. Checking to see if
the target of the first ghost pad is itself a ghost pad fixes the crash.
https://bugzilla.gnome.org/show_bug.cgi?id=762087
backends/gstreamer/rb-player-gst-xfade.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/backends/gstreamer/rb-player-gst-xfade.c b/backends/gstreamer/rb-player-gst-xfade.c
index f449b7d..0f53f25 100644
--- a/backends/gstreamer/rb-player-gst-xfade.c
+++ b/backends/gstreamer/rb-player-gst-xfade.c
@@ -2059,6 +2059,13 @@ add_stream_uri_tag (GstPad *pad, RBXFadeStream *stream)
/* uridecodebin src -> decodebin src */
t2 = gst_ghost_pad_get_target (GST_GHOST_PAD (pad));
+ if (GST_IS_GHOST_PAD (t2) == FALSE) {
+ /* raw sources get exposed directly */
+ rb_debug ("not setting stream uri for raw stream");
+ gst_object_unref (t2);
+ gst_tag_list_unref (t);
+ return;
+ }
/* decodebin src -> actual decoder src */
target = gst_ghost_pad_get_target (GST_GHOST_PAD (t2));
@@ -2080,6 +2087,7 @@ add_stream_uri_tag (GstPad *pad, RBXFadeStream *stream)
gst_object_unref (sink);
} else {
rb_debug ("not setting stream uri tag for %s", GST_OBJECT_NAME (e));
+ gst_tag_list_unref (t);
}
gst_object_unref (e);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]