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;