diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2014-04-09 11:15:10 +0100 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2014-04-09 11:15:10 +0100 |
commit | 744c58d71b21475d2edd5b9334e277cfa4c53260 (patch) | |
tree | 6866827dd2c44f00ac95f0e636b86196274d4c17 /gst/speed | |
parent | b4d62ce210407b17adb1229a0a9531a5270c9cb7 (diff) | |
download | gstreamer-plugins-bad-744c58d71b21475d2edd5b9334e277cfa4c53260.tar.gz |
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
Diffstat (limited to 'gst/speed')
-rw-r--r-- | gst/speed/gstspeed.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c index 374ef5fe9..7afae38cd 100644 --- a/gst/speed/gstspeed.c +++ b/gst/speed/gstspeed.c @@ -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) |