baseparse: always attempt to push if not-linked
authorEdward Hervey <edward.hervey@collabora.co.uk>
Mon, 2 Apr 2012 13:13:24 +0000 (15:13 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Mon, 2 Apr 2012 13:17:25 +0000 (15:17 +0200)
This avoids ending up with plenty of pending data (since we'll only
 try to parse/push one frame from the incoming buffer).

Fixes increasing memory consumption when parsers aren't linked

libs/gst/base/gstbaseparse.c

index 108ee89..56a0818 100644 (file)
@@ -2466,7 +2466,7 @@ gst_base_parse_chain (GstPad * pad, GstBuffer * buffer)
     ret = gst_base_parse_handle_and_push_frame (parse, bclass, frame);
     GST_PAD_STREAM_UNLOCK (parse->srcpad);
 
-    if (ret != GST_FLOW_OK) {
+    if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED) {
       GST_LOG_OBJECT (parse, "push returned %d", ret);
       break;
     }