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
This commit is contained in:
Jan Schmidt 2016-11-15 23:36:41 +11:00
parent 1840b0233a
commit 2b06e54651

View file

@ -1615,6 +1615,13 @@ gst_video_decoder_src_query_default (GstVideoDecoder * dec, GstQuery * query)
break; 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 */ /* we start from the last seen time */
time = dec->priv->last_timestamp_out; time = dec->priv->last_timestamp_out;
/* correct for the segment values */ /* correct for the segment values */