diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 78cb2f676c..15ce407483 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -1356,6 +1356,7 @@ gst_matroska_demux_query (GstMatroskaDemux * demux, GstPad * pad, gst_query_parse_position (query, &format, NULL); + res = TRUE; if (format == GST_FORMAT_TIME) { GST_OBJECT_LOCK (demux); if (context) @@ -1376,9 +1377,9 @@ gst_matroska_demux_query (GstMatroskaDemux * demux, GstPad * pad, } else { GST_DEBUG_OBJECT (demux, "only position query in TIME and DEFAULT format is supported"); + res = FALSE; } - res = TRUE; break; } case GST_QUERY_DURATION: @@ -1387,6 +1388,7 @@ gst_matroska_demux_query (GstMatroskaDemux * demux, GstPad * pad, gst_query_parse_duration (query, &format, NULL); + res = TRUE; if (format == GST_FORMAT_TIME) { GST_OBJECT_LOCK (demux); gst_query_set_duration (query, GST_FORMAT_TIME, @@ -1401,9 +1403,8 @@ gst_matroska_demux_query (GstMatroskaDemux * demux, GstPad * pad, } else { GST_DEBUG_OBJECT (demux, "only duration query in TIME and DEFAULT format is supported"); + res = FALSE; } - - res = TRUE; break; }