Revert "queue: Illegal memory access of sink event"
authorSebastian Dröge <sebastian@centricular.com>
Mon, 14 Dec 2015 10:16:50 +0000 (11:16 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 14 Dec 2015 10:20:22 +0000 (11:20 +0100)
This reverts commit 78614c505a2a761cb4dcb7f4e5f3e9f97c9a8e88.

The code it was fixing does not have any effect anyway and will be removed in
the next commit.

plugins/elements/gstqueue.c

index c787e2b..6d9810f 100644 (file)
@@ -902,11 +902,10 @@ gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
 {
   gboolean ret = TRUE;
   GstQueue *queue;
-  GstEventType event_type = GST_EVENT_TYPE (event);
 
   queue = GST_QUEUE (parent);
 
-  switch (event_type) {
+  switch (GST_EVENT_TYPE (event)) {
     case GST_EVENT_FLUSH_START:
       STATUS (queue, pad, "received flush start event");
       /* forward event */
@@ -961,7 +960,7 @@ gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
           if (!GST_EVENT_IS_STICKY (event)) {
             GST_QUEUE_MUTEX_UNLOCK (queue);
             goto out_flow_error;
-          } else if (event_type == GST_EVENT_EOS) {
+          } else if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
             if (queue->srcresult == GST_FLOW_NOT_LINKED
                 || queue->srcresult < GST_FLOW_EOS) {
               GST_QUEUE_MUTEX_UNLOCK (queue);
@@ -987,7 +986,7 @@ gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
       break;
   }
   if (ret == FALSE) {
-    if (event_type == GST_EVENT_CAPS)
+    if (GST_EVENT_TYPE (event) == GST_EVENT_CAPS)
       return GST_FLOW_NOT_NEGOTIATED;
     return GST_FLOW_ERROR;
   }