queue: queue2: preserve last flow result when pushing events
authorThiago Santos <ts.santos@sisa.samsung.com>
Mon, 10 Mar 2014 12:49:07 +0000 (09:49 -0300)
committerThiago Santos <ts.santos@sisa.samsung.com>
Mon, 10 Mar 2014 13:10:20 +0000 (10:10 -0300)
Avoids mistakenly returning _OK when downstream is still
_NOT_LINKED on subsequent received pad pushes

https://bugzilla.gnome.org/show_bug.cgi?id=725917

plugins/elements/gstqueue.c
plugins/elements/gstqueue2.c

index 5bb67740780ca8ccea3a7d52b61d3759dabb933a..46e969f15cca5ac51154fbfb893a30b10c5c7478 100644 (file)
@@ -1089,7 +1089,7 @@ out_unexpected:
 static GstFlowReturn
 gst_queue_push_one (GstQueue * queue)
 {
-  GstFlowReturn result = GST_FLOW_OK;
+  GstFlowReturn result = queue->srcresult;
   GstMiniObject *data;
 
   data = gst_queue_locked_dequeue (queue);
index d023d1c4df53d3b735642fd94d159655a8c157fc..36cd4055b8a4e1f4e07e72665428b52ddea7f311 100644 (file)
@@ -2577,7 +2577,7 @@ gst_queue2_dequeue_on_eos (GstQueue2 * queue, GstQueue2ItemType * item_type)
 static GstFlowReturn
 gst_queue2_push_one (GstQueue2 * queue)
 {
-  GstFlowReturn result = GST_FLOW_OK;
+  GstFlowReturn result = queue->srcresult;
   GstMiniObject *data;
   GstQueue2ItemType item_type;