ebml: Fix push-based behaviour
authorEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 19 Oct 2011 11:09:51 +0000 (13:09 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Wed, 19 Oct 2011 11:10:47 +0000 (13:10 +0200)
The 'peek' method was completely wrong (!?)

gst/matroska/matroska-read-common.c

index 672dcc3..276fa85 100644 (file)
@@ -1547,11 +1547,15 @@ gst_matroska_read_common_parse_metadata (GstMatroskaReadCommon * common,
   return ret;
 }
 
-static const guint8 *
+static GstFlowReturn
 gst_matroska_read_common_peek_adapter (GstMatroskaReadCommon * common, guint
-    peek)
+    peek, const guint8 ** data)
 {
-  return gst_adapter_peek (common->adapter, peek);
+  *data = gst_adapter_peek (common->adapter, peek);
+  if (*data == NULL)
+    return GST_FLOW_ERROR;
+
+  return GST_FLOW_OK;
 }
 
 /*