From 16fd917632c0992349ca28cf9108e9562c493ad7 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 2 Jun 2014 10:11:58 +0200 Subject: [PATCH] speed: make position query able to convert bytes to time (same as 744c58d71b21475d2edd5b9334e277cfa4c53260 but for the position query) It was only querying in time, but then trying to use dead bytes to time conversion code. Coverity 1139677 --- gst/speed/gstspeed.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/speed/gstspeed.c b/gst/speed/gstspeed.c index 27e41c7ca8..f845fd624c 100644 --- a/gst/speed/gstspeed.c +++ b/gst/speed/gstspeed.c @@ -275,6 +275,12 @@ speed_src_query (GstPad * pad, GstObject * parent, GstQuery * query) gst_query_set_position (query, GST_FORMAT_TIME, -1); if (!gst_pad_peer_query_position (filter->sinkpad, rformat, &cur)) { + GST_LOG_OBJECT (filter, "TIME query on peer pad failed, trying BYTES"); + rformat = GST_FORMAT_BYTES; + if (!gst_pad_peer_query_position (filter->sinkpad, rformat, &cur)) { + GST_LOG_OBJECT (filter, "BYTES query on peer pad failed too"); + goto error; + } GST_LOG_OBJECT (filter, "query on peer pad failed"); goto error; }