baseparse: also perform state processing upon non-OK return
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Mon, 4 Jun 2012 09:13:02 +0000 (11:13 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Mon, 4 Jun 2012 09:47:55 +0000 (11:47 +0200)
... since processing might still continue (if e.g. NOT_LINKED)
and then proper state (e.g. offset) needs to be maintained
(e.g. to arrange for a new frame setup).

libs/gst/base/gstbaseparse.c

index 8067e53..a41a04e 100644 (file)
@@ -1778,11 +1778,6 @@ gst_base_parse_handle_buffer (GstBaseParse * parse, GstBuffer * buffer,
   GST_LOG_OBJECT (parse, "handle_frame skipped %d, flushed %d",
       *skip, *flushed);
 
-  if (ret != GST_FLOW_OK) {
-    GST_DEBUG_OBJECT (parse, "handle_frame returned %d", ret);
-    goto exit;
-  }
-
   /* subclass can only do one of these, or semantics are too unclear */
   g_assert (*skip == 0 || *flushed == 0);
 
@@ -1817,7 +1812,6 @@ gst_base_parse_handle_buffer (GstBaseParse * parse, GstBuffer * buffer,
 
   parse->priv->offset += *flushed;
 
-exit:
   if (parse->priv->pad_mode == GST_PAD_MODE_PULL) {
     gst_adapter_clear (parse->priv->adapter);
   }