mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
inputselector: Fix getcaps and event function from last commit
Return ANY caps if the parent disappeared, i.e. the template caps and don't leak events if the parent disappeared.
This commit is contained in:
parent
297407438a
commit
ba6054b862
1 changed files with 4 additions and 2 deletions
|
@ -1174,8 +1174,10 @@ gst_input_selector_event (GstPad * pad, GstEvent * event)
|
|||
GstPad *otherpad;
|
||||
|
||||
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (sel == NULL))
|
||||
if (G_UNLIKELY (sel == NULL)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
otherpad = gst_input_selector_get_linked_pad (sel, pad, TRUE);
|
||||
if (otherpad) {
|
||||
|
@ -1283,7 +1285,7 @@ gst_input_selector_getcaps (GstPad * pad)
|
|||
|
||||
sel = GST_INPUT_SELECTOR (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (sel == NULL))
|
||||
return FALSE;
|
||||
return gst_caps_new_any ();
|
||||
|
||||
otherpad = gst_input_selector_get_linked_pad (sel, pad, FALSE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue