From f8d63c5ad929dccf832255efdaf0d328a274ef23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 14 May 2014 00:23:35 +0100 Subject: [PATCH] mxfdemux: post error message when erroring out on unsupported essence wrapping --- gst/mxf/mxfdemux.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index c2ee74148d..eb7fd4aca6 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -861,12 +861,19 @@ gst_mxf_demux_update_essence_tracks (GstMXFDemux * demux) caps = NULL; } + if (etrack->handler != NULL) { + MXFEssenceWrapping track_wrapping; - if (etrack->handler - && etrack->handler->get_track_wrapping (track) != - MXF_ESSENCE_WRAPPING_FRAME_WRAPPING) { - GST_ERROR_OBJECT (demux, "Only frame wrapping currently supported"); - return GST_FLOW_ERROR; + track_wrapping = etrack->handler->get_track_wrapping (track); + if (track_wrapping == MXF_ESSENCE_WRAPPING_CLIP_WRAPPING) { + GST_ELEMENT_ERROR (demux, STREAM, NOT_IMPLEMENTED, (NULL), + ("Clip essence wrapping is not implemented yet.")); + return GST_FLOW_ERROR; + } else if (track_wrapping == MXF_ESSENCE_WRAPPING_CUSTOM_WRAPPING) { + GST_ELEMENT_ERROR (demux, STREAM, NOT_IMPLEMENTED, (NULL), + ("Custom essence wrappings are not supported.")); + return GST_FLOW_ERROR; + } } etrack->source_package = package;