basesrc: don't handle SEEKING queries for formats that don't match the one the source...
authorRobin Stocker <robin@nibor.org>
Fri, 24 Jul 2009 08:50:19 +0000 (09:50 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Fri, 24 Jul 2009 10:54:31 +0000 (11:54 +0100)
commit527da05476e6d72ba04d1f11fe55eb797d88dc0d
tree6f043454bcbdbb900f9d483a734783d96555a6c0
parent01014d671723bc630cadfa3444fd0f6f7372b518
basesrc: don't handle SEEKING queries for formats that don't match the one the source operates in

Return FALSE in basesrc's default query handler when we get a SEEKING query for
a format that's not the one the source operates in. Previously (ie. before, in
the git version) we would return TRUE in that case and seekable=FALSE, which
is more correct, but causes backwards compatibility problems. (Before that
we would change the format of the query when answering, which was completely
broken since callers don't expect that or check for it). Since the SEEKING
query is a fairly recent addition, not all demuxers, parsers and decoders
implement it yet, in which case any SEEKING query by an application will
just be passed upstream where it will then be handled by basesrc. Now, if
e.g. totem does a SEEKING query for TIME format and we have a demuxer that
doesn't implement the query, basesrc would answer it with seekable=FALSE in
most cases, and totem can only take that as authoritative answer, not knowing
that the demuxer doesn't implement the SEEKING query. To avoid this, we make
basesrc return FALSE to SEEKING queries in unhandled formats. That way
applications like totem can fall back on assuming seekability depending on
whether a duration is available, or somesuch. Downstream elements doing
such queries are likely to equate an unhandled query with a non-seekable
response as well, so this should be an acceptable fix for the time being.

See #584838, #588944, #589423 and #589424.
libs/gst/base/gstbasesrc.c