mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
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.
This commit is contained in:
parent
e22aa0550c
commit
a818da90ad
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2004-11-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* gst/avi/gstavidemux.c: (gst_avi_demux_stream_index),
|
* gst/avi/gstavidemux.c: (gst_avi_demux_stream_index),
|
||||||
|
|
|
@ -212,18 +212,18 @@ stream_info_mute_pad (GstStreamInfo * stream_info, GstPad * pad, gboolean mute)
|
||||||
int_links; int_links = g_list_next (int_links)) {
|
int_links; int_links = g_list_next (int_links)) {
|
||||||
GstPad *pad = GST_PAD (int_links->data);
|
GstPad *pad = GST_PAD (int_links->data);
|
||||||
GstPad *peer = gst_pad_get_peer (pad);
|
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",
|
GST_DEBUG_OBJECT (stream_info, "%s internal pad %s:%s",
|
||||||
debug_str, GST_DEBUG_PAD_NAME (pad));
|
debug_str, GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
gst_pad_set_active (pad, activate);
|
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_DEBUG_OBJECT (stream_info, "recursing element %s on pad %s:%s",
|
||||||
gst_element_get_name (peer_elem), GST_DEBUG_PAD_NAME (peer));
|
gst_element_get_name (peer_elem), GST_DEBUG_PAD_NAME (peer));
|
||||||
stream_info_mute_pad (stream_info, peer, mute);
|
stream_info_mute_pad (stream_info, peer, mute);
|
||||||
} else {
|
} else if (peer) {
|
||||||
GST_DEBUG_OBJECT (stream_info, "%s final pad %s:%s",
|
GST_DEBUG_OBJECT (stream_info, "%s final pad %s:%s",
|
||||||
debug_str, GST_DEBUG_PAD_NAME (peer));
|
debug_str, GST_DEBUG_PAD_NAME (peer));
|
||||||
gst_pad_set_active (peer, activate);
|
gst_pad_set_active (peer, activate);
|
||||||
|
|
Loading…
Reference in a new issue