summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis.bg@samsung.com>2015-07-02 15:10:43 +0100
committerLuis de Bethencourt <luis.bg@samsung.com>2015-07-02 15:10:58 +0100
commitc635f38cdc39b11de18ecf21e39e598435b91e7a (patch)
tree536912731d782f150487e534ce5b3f1fa6e0c2a0 /plugins
parent231e77338c0ffaef098d7c008a5cb9beb8f56870 (diff)
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
Diffstat (limited to 'plugins')
-rw-r--r--plugins/elements/gstinputselector.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c
index 78397c5ce..aa5cad322 100644
--- a/plugins/elements/gstinputselector.c
+++ b/plugins/elements/gstinputselector.c
@@ -627,21 +627,19 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
GST_INPUT_SELECTOR_UNLOCK (sel);
if (new_tags)
g_object_notify (G_OBJECT (selpad), "tags");
- if (event) {
- if (forward) {
- GST_DEBUG_OBJECT (pad, "forwarding event");
- res = gst_pad_push_event (sel->srcpad, event);
- } else {
- /* If we aren't forwarding the event because the pad is not the
- * active_sinkpad, then set the flag on the pad
- * that says a segment needs sending if/when that pad is activated.
- * For all other cases, we send the event immediately, which makes
- * sparse streams and other segment updates work correctly downstream.
- */
- if (GST_EVENT_IS_STICKY (event))
- selpad->events_pending = TRUE;
- gst_event_unref (event);
- }
+ if (forward) {
+ GST_DEBUG_OBJECT (pad, "forwarding event");
+ res = gst_pad_push_event (sel->srcpad, event);
+ } else {
+ /* If we aren't forwarding the event because the pad is not the
+ * active_sinkpad, then set the flag on the pad
+ * that says a segment needs sending if/when that pad is activated.
+ * For all other cases, we send the event immediately, which makes
+ * sparse streams and other segment updates work correctly downstream.
+ */
+ if (GST_EVENT_IS_STICKY (event))
+ selpad->events_pending = TRUE;
+ gst_event_unref (event);
}
return res;