summaryrefslogtreecommitdiff
path: root/gst/matroska
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-06-25 13:31:16 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-06-25 13:31:16 +0200
commit8cbaaba94885486cb124892aad6d36dc7925b922 (patch)
tree24955344f8f54d1e2a42011b88eadfbd3aec1d69 /gst/matroska
parentc6cd91755487fc2af67d71dccef457af01a33d0b (diff)
matroskademux: Return FALSE from queries if we can't answer POSITION/DURATION queries
Diffstat (limited to 'gst/matroska')
-rw-r--r--gst/matroska/matroska-demux.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 8696238ac..8e1b38d14 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -1379,6 +1379,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)
@@ -1399,9 +1400,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:
@@ -1410,6 +1411,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,
@@ -1424,9 +1426,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;
}
@@ -1981,10 +1982,10 @@ gst_matroska_demux_handle_seek_event (GstMatroskaDemux * demux,
gst_segment_set_duration (&seeksegment, GST_FORMAT_TIME,
demux->common.segment.duration);
- flush = !!(flags & GST_SEEK_FLAG_FLUSH);
- keyunit = !!(flags & GST_SEEK_FLAG_KEY_UNIT);
- after = !!(flags & GST_SEEK_FLAG_SNAP_AFTER);
- before = !!(flags & GST_SEEK_FLAG_SNAP_BEFORE);
+ flush = ! !(flags & GST_SEEK_FLAG_FLUSH);
+ keyunit = ! !(flags & GST_SEEK_FLAG_KEY_UNIT);
+ after = ! !(flags & GST_SEEK_FLAG_SNAP_AFTER);
+ before = ! !(flags & GST_SEEK_FLAG_SNAP_BEFORE);
/* always do full update if flushing,
* otherwise problems might arise downstream with missing keyframes etc */