mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +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)) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue