mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
plugins/elements/gstinputselector.c: Gracefully handle the cases when we dont' have otherpad.
Original commit message from CVS: * plugins/elements/gstinputselector.c: (gst_input_selector_event), (gst_input_selector_query): Gracefully handle the cases when we dont' have otherpad. Fixes #556430
This commit is contained in:
parent
832f2f46e7
commit
acafa09a74
1 changed files with 10 additions and 7 deletions
|
@ -1017,15 +1017,16 @@ gst_input_selector_get_linked_pad (GstPad * pad, gboolean strict)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_input_selector_event (GstPad * pad, GstEvent * event)
|
gst_input_selector_event (GstPad * pad, GstEvent * event)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res = FALSE;
|
||||||
GstPad *otherpad;
|
GstPad *otherpad;
|
||||||
|
|
||||||
otherpad = gst_input_selector_get_linked_pad (pad, TRUE);
|
otherpad = gst_input_selector_get_linked_pad (pad, TRUE);
|
||||||
|
|
||||||
|
if (otherpad) {
|
||||||
res = gst_pad_push_event (otherpad, event);
|
res = gst_pad_push_event (otherpad, event);
|
||||||
|
|
||||||
gst_object_unref (otherpad);
|
gst_object_unref (otherpad);
|
||||||
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1034,7 +1035,7 @@ gst_input_selector_event (GstPad * pad, GstEvent * event)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_input_selector_query (GstPad * pad, GstQuery * query)
|
gst_input_selector_query (GstPad * pad, GstQuery * query)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res = TRUE;
|
||||||
GstInputSelector *sel;
|
GstInputSelector *sel;
|
||||||
GstPad *otherpad;
|
GstPad *otherpad;
|
||||||
|
|
||||||
|
@ -1101,9 +1102,11 @@ gst_input_selector_query (GstPad * pad, GstQuery * query)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
if (otherpad)
|
||||||
res = gst_pad_peer_query (otherpad, query);
|
res = gst_pad_peer_query (otherpad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (otherpad)
|
||||||
gst_object_unref (otherpad);
|
gst_object_unref (otherpad);
|
||||||
gst_object_unref (sel);
|
gst_object_unref (sel);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue