diff --git a/gst/matroska/matroska-read-common.c b/gst/matroska/matroska-read-common.c index 672dcc3fc6..276fa85d4a 100644 --- a/gst/matroska/matroska-read-common.c +++ b/gst/matroska/matroska-read-common.c @@ -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; } /*