gst/typefind/gsttypefindfunctions.c: Rework mpeg video stream typefinding a bit more...
authorTim-Philipp Müller <tim@centricular.net>
Wed, 30 Apr 2008 20:54:56 +0000 (20:54 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Wed, 30 Apr 2008 20:54:56 +0000 (20:54 +0000)
commitf8977b9e9ec4be4d896cdd92d5d56b583fddc134
tree998433b8ebcddf3560a349dc027739babf960139
parent0947ecf74cfa6f76892b7c2da42041e316585280
gst/typefind/gsttypefindfunctions.c: Rework mpeg video stream typefinding a bit more: make sure sequence,

Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c:
(mpeg_video_stream_ctx_ensure_data), (mpeg_video_stream_type_find),
(plugin_init):
Rework mpeg video stream typefinding a bit more: make sure sequence,
GOP, picture and slice headers appear in the order they should and
that we've in fact at least had one of each; fix picture header
detection; decouple picture and slice header check - don't assume
they're at a fixed offset, there may be extra data in between. Also,
announce varying degrees of probability depending on what we found
exactly (multiple pictures, at least one picture, just sequence and
GOP headers). Finally, in _ensure_data(), take into account that we
might be typefinding smaller amounts of data, such as the first
buffer of a stream, so fall back to the minimum size needed as long
as that's available, instead of erroring out if there's less than
2kB of data. Fixes #526173. Conveniently also doesn't recognise the
fuzzed file from #399342 as valid.
ChangeLog
gst/typefind/gsttypefindfunctions.c