mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
flvdemux: un-break duration querying
Commit 2b9493b5
broke this in two ways: a) we should only
pass duration queries in TIME format upstream (or at least
not those in DEFAULT or BYTE format), and b) we mustn't
overwrite the default value of 'res' from TRUE to FALSE
and not set it again later. This led to bogus durations
being reported for FLV playback from file, because TIME
queries would fail (as 'res' had been set to FALSE) and
parsers then do a BYTE query as fallback and try to
guesstimate something in return, which of course goes
horribly wrong since the BYTE size returned is for the
muxed file.
This commit is contained in:
parent
0911307d7d
commit
9afeb9652b
1 changed files with 6 additions and 6 deletions
|
@ -3143,11 +3143,6 @@ gst_flv_demux_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
{
|
||||
GstFormat format;
|
||||
|
||||
/* Try to push upstream first */
|
||||
res = gst_pad_peer_query (demux->sinkpad, query);
|
||||
if (res)
|
||||
goto beach;
|
||||
|
||||
gst_query_parse_duration (query, &format, NULL);
|
||||
|
||||
/* duration is time only */
|
||||
|
@ -3158,11 +3153,16 @@ gst_flv_demux_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
goto beach;
|
||||
}
|
||||
|
||||
/* Try to push upstream first */
|
||||
res = gst_pad_peer_query (demux->sinkpad, query);
|
||||
if (res)
|
||||
goto beach;
|
||||
|
||||
GST_DEBUG_OBJECT (pad, "duration query, replying %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (demux->duration));
|
||||
|
||||
gst_query_set_duration (query, GST_FORMAT_TIME, demux->duration);
|
||||
|
||||
res = TRUE;
|
||||
break;
|
||||
}
|
||||
case GST_QUERY_POSITION:
|
||||
|
|
Loading…
Reference in a new issue