queue: Don't generate GST_FLOW_ERROR without logging
authorJan Schmidt <jan@centricular.com>
Mon, 2 Jan 2017 15:13:30 +0000 (02:13 +1100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 9 Jan 2017 13:46:24 +0000 (15:46 +0200)
At least log a message to the debug log when generating
a GST_FLOW_ERROR, to make it possible to find where it came from.

plugins/elements/gstqueue.c

index 1f0c09cf154bad9230a370cc949eb93f2d9d4c8f..64560406db362d9467a05a73bf718844797e273a 100644 (file)
@@ -1004,8 +1004,10 @@ gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
       }
       break;
   }
-  if (ret == FALSE)
+  if (ret == FALSE) {
+    GST_ERROR_OBJECT (queue, "Failed to push event");
     return GST_FLOW_ERROR;
+  }
   return GST_FLOW_OK;
 
   /* ERRORS */
@@ -1452,7 +1454,7 @@ next:
   /* ERRORS */
 no_item:
   {
-    GST_CAT_LOG_OBJECT (queue_dataflow, queue,
+    GST_CAT_ERROR_OBJECT (queue_dataflow, queue,
         "exit because we have no item in the queue");
     return GST_FLOW_ERROR;
   }