summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-11-29 17:01:34 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2004-11-29 17:01:34 +0000
commita818da90adeafd39e8865bcf3d126f3cf4fecf1b (patch)
treee58b62a99a9f6831a53bf54432e2fe17bafe4d63
parente22aa0550ce911e0bc84484a8fa995a378c56068 (diff)
downloadgstreamer-plugins-base-a818da90adeafd39e8865bcf3d126f3cf4fecf1b.tar.gz
gst/playback/gststreaminfo.c: On mute of an unlinked stream, check for pad availability so we don't crash on unlinked...
Original commit message from CVS: * gst/playback/gststreaminfo.c: (stream_info_mute_pad): On mute of an unlinked stream, check for pad availability so we don't crash on unlinked pad.
-rw-r--r--ChangeLog6
-rw-r--r--gst/playback/gststreaminfo.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a3ec0f4ad..33720086f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2004-11-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * gst/playback/gststreaminfo.c: (stream_info_mute_pad):
+ On mute of an unlinked stream, check for pad availability so
+ we don't crash on unlinked pad.
+
+2004-11-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
* gst/avi/gstavidemux.c: (gst_avi_demux_stream_index),
(gst_avi_demux_massage_index):
Fix quite humiliating bug in omitting 0-sized index chunks but
diff --git a/gst/playback/gststreaminfo.c b/gst/playback/gststreaminfo.c
index 62cdfcccc..80362b1d0 100644
--- a/gst/playback/gststreaminfo.c
+++ b/gst/playback/gststreaminfo.c
@@ -212,18 +212,18 @@ stream_info_mute_pad (GstStreamInfo * stream_info, GstPad * pad, gboolean mute)
int_links; int_links = g_list_next (int_links)) {
GstPad *pad = GST_PAD (int_links->data);
GstPad *peer = gst_pad_get_peer (pad);
- GstElement *peer_elem = gst_pad_get_parent (peer);
+ GstElement *peer_elem = peer ? gst_pad_get_parent (peer) : NULL;
GST_DEBUG_OBJECT (stream_info, "%s internal pad %s:%s",
debug_str, GST_DEBUG_PAD_NAME (pad));
gst_pad_set_active (pad, activate);
- if (peer_elem->numsrcpads == 1) {
+ if (peer_elem && peer_elem->numsrcpads == 1) {
GST_DEBUG_OBJECT (stream_info, "recursing element %s on pad %s:%s",
gst_element_get_name (peer_elem), GST_DEBUG_PAD_NAME (peer));
stream_info_mute_pad (stream_info, peer, mute);
- } else {
+ } else if (peer) {
GST_DEBUG_OBJECT (stream_info, "%s final pad %s:%s",
debug_str, GST_DEBUG_PAD_NAME (peer));
gst_pad_set_active (peer, activate);