mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
speed: make duration query able to convert bytes to time
It was only querying in time, but then trying to use dead bytes to time conversion code. Coverity 1139677
This commit is contained in:
parent
b4d62ce210
commit
744c58d71b
1 changed files with 6 additions and 2 deletions
|
@ -324,8 +324,12 @@ speed_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
gst_query_set_duration (query, GST_FORMAT_TIME, -1);
|
||||
|
||||
if (!gst_pad_peer_query_duration (filter->sinkpad, rformat, &end)) {
|
||||
GST_LOG_OBJECT (filter, "query on peer pad failed");
|
||||
goto error;
|
||||
GST_LOG_OBJECT (filter, "TIME query on peer pad failed, trying BYTES");
|
||||
rformat = GST_FORMAT_BYTES;
|
||||
if (!gst_pad_peer_query_duration (filter->sinkpad, rformat, &end)) {
|
||||
GST_LOG_OBJECT (filter, "BYTES query on peer pad failed too");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
if (rformat == GST_FORMAT_BYTES)
|
||||
|
|
Loading…
Reference in a new issue