From 2b06e54651956d779123020c51c466397f5161ac Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 15 Nov 2016 23:36:41 +1100 Subject: [PATCH] videodecoder: Don't answer BYTES queries Refuse to answer BYTES queries ourselves. The only time they make sense is on raw elementary streams, in which case upstream would already have answered. https://bugzilla.gnome.org/show_bug.cgi?id=757631 --- gst-libs/gst/video/gstvideodecoder.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 4b9209caac..71ee3a01c4 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -1615,6 +1615,13 @@ gst_video_decoder_src_query_default (GstVideoDecoder * dec, GstQuery * query) break; } + /* Refuse BYTES format queries. If it made sense to + * answer them, upstream would have already */ + if (format == GST_FORMAT_BYTES) { + GST_LOG_OBJECT (dec, "Ignoring BYTES position query"); + break; + } + /* we start from the last seen time */ time = dec->priv->last_timestamp_out; /* correct for the segment values */