mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
mpegdemux: answer position query with a stream time position
https://bugzilla.gnome.org/show_bug.cgi?id=659485
This commit is contained in:
parent
71f28c44a0
commit
49d1121101
1 changed files with 4 additions and 4 deletions
|
@ -1247,6 +1247,7 @@ gst_flups_demux_src_query (GstPad * pad, GstQuery * query)
|
|||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_POSITION:
|
||||
{
|
||||
GstClockTime pos;
|
||||
GstFormat format;
|
||||
|
||||
gst_query_parse_position (query, &format, NULL);
|
||||
|
@ -1257,10 +1258,9 @@ gst_flups_demux_src_query (GstPad * pad, GstQuery * query)
|
|||
goto not_supported;
|
||||
}
|
||||
|
||||
GST_LOG_OBJECT (demux, "Position at GStreamer Time:%" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (demux->src_segment.last_stop));
|
||||
|
||||
gst_query_set_position (query, format, demux->src_segment.last_stop);
|
||||
pos = demux->src_segment.last_stop - demux->src_segment.start;
|
||||
GST_LOG_OBJECT (demux, "Position %" GST_TIME_FORMAT, GST_TIME_ARGS (pos));
|
||||
gst_query_set_position (query, format, pos);
|
||||
res = TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue