inputselector: remove always-true check

event can't be NULL, it has been dereferenced by GST_EVENT_TYPE (), and no
case frees the pointer. Remove unnecessary check which will always be True.

CID #1308955
This commit is contained in:
Luis de Bethencourt 2015-07-02 15:10:43 +01:00
parent 231e77338c
commit c635f38cdc

View file

@ -627,21 +627,19 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
GST_INPUT_SELECTOR_UNLOCK (sel); GST_INPUT_SELECTOR_UNLOCK (sel);
if (new_tags) if (new_tags)
g_object_notify (G_OBJECT (selpad), "tags"); g_object_notify (G_OBJECT (selpad), "tags");
if (event) { if (forward) {
if (forward) { GST_DEBUG_OBJECT (pad, "forwarding event");
GST_DEBUG_OBJECT (pad, "forwarding event"); res = gst_pad_push_event (sel->srcpad, event);
res = gst_pad_push_event (sel->srcpad, event); } else {
} else { /* If we aren't forwarding the event because the pad is not the
/* If we aren't forwarding the event because the pad is not the * active_sinkpad, then set the flag on the pad
* active_sinkpad, then set the flag on the pad * that says a segment needs sending if/when that pad is activated.
* that says a segment needs sending if/when that pad is activated. * For all other cases, we send the event immediately, which makes
* For all other cases, we send the event immediately, which makes * sparse streams and other segment updates work correctly downstream.
* sparse streams and other segment updates work correctly downstream. */
*/ if (GST_EVENT_IS_STICKY (event))
if (GST_EVENT_IS_STICKY (event)) selpad->events_pending = TRUE;
selpad->events_pending = TRUE; gst_event_unref (event);
gst_event_unref (event);
}
} }
return res; return res;