From bd51aa7aa8a4e01b880ddf9c3174f122ad15e7d3 Mon Sep 17 00:00:00 2001 From: Eric Trousset Date: Fri, 9 May 2014 16:48:58 +0200 Subject: [PATCH] qtdemux: don't respond to a position query in BYTE format with a TIME position https://bugzilla.gnome.org/show_bug.cgi?id=729553 --- gst/isomp4/qtdemux.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 613edad576..bcf9d524d7 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -737,12 +737,17 @@ gst_qtdemux_handle_src_query (GstPad * pad, GstObject * parent, GST_LOG_OBJECT (pad, "%s query", GST_QUERY_TYPE_NAME (query)); switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_POSITION: - if (GST_CLOCK_TIME_IS_VALID (qtdemux->segment.position)) { + case GST_QUERY_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, qtdemux->segment.position); res = TRUE; } + } break; case GST_QUERY_DURATION:{ GstFormat fmt;