mpegdemux: answer position query with a stream time position

https://bugzilla.gnome.org/show_bug.cgi?id=659485
This commit is contained in:
Vincent Penquerc'h 2011-09-21 17:29:52 +01:00 committed by Tim-Philipp Müller
parent 71f28c44a0
commit 49d1121101

View file

@ -1247,6 +1247,7 @@ gst_flups_demux_src_query (GstPad * pad, GstQuery * query)
switch (GST_QUERY_TYPE (query)) { switch (GST_QUERY_TYPE (query)) {
case GST_QUERY_POSITION: case GST_QUERY_POSITION:
{ {
GstClockTime pos;
GstFormat format; GstFormat format;
gst_query_parse_position (query, &format, NULL); gst_query_parse_position (query, &format, NULL);
@ -1257,10 +1258,9 @@ gst_flups_demux_src_query (GstPad * pad, GstQuery * query)
goto not_supported; goto not_supported;
} }
GST_LOG_OBJECT (demux, "Position at GStreamer Time:%" GST_TIME_FORMAT, pos = demux->src_segment.last_stop - demux->src_segment.start;
GST_TIME_ARGS (demux->src_segment.last_stop)); GST_LOG_OBJECT (demux, "Position %" GST_TIME_FORMAT, GST_TIME_ARGS (pos));
gst_query_set_position (query, format, pos);
gst_query_set_position (query, format, demux->src_segment.last_stop);
res = TRUE; res = TRUE;
break; break;
} }