Commit bd51aa7a authored by Eric Trousset's avatar Eric Trousset Committed by Tim-Philipp Müller
Browse files

qtdemux: don't respond to a position query in BYTE format with a TIME position

https://bugzilla.gnome.org/show_bug.cgi?id=729553
parent 9872c194
...@@ -737,12 +737,17 @@ gst_qtdemux_handle_src_query (GstPad * pad, GstObject * parent, ...@@ -737,12 +737,17 @@ gst_qtdemux_handle_src_query (GstPad * pad, GstObject * parent,
GST_LOG_OBJECT (pad, "%s query", GST_QUERY_TYPE_NAME (query)); GST_LOG_OBJECT (pad, "%s query", GST_QUERY_TYPE_NAME (query));
switch (GST_QUERY_TYPE (query)) { switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION: case GST_QUERY_POSITION:{
if (GST_CLOCK_TIME_IS_VALID (qtdemux->segment.position)) { GstFormat fmt;
gst_query_parse_position (query, &fmt, NULL);
if (fmt == GST_FORMAT_TIME
&& GST_CLOCK_TIME_IS_VALID (qtdemux->segment.position)) {
gst_query_set_position (query, GST_FORMAT_TIME, gst_query_set_position (query, GST_FORMAT_TIME,
qtdemux->segment.position); qtdemux->segment.position);
res = TRUE; res = TRUE;
} }
}
break; break;
case GST_QUERY_DURATION:{ case GST_QUERY_DURATION:{
GstFormat fmt; GstFormat fmt;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment