[gstreamer-bugs] [Bug 526173] [typefinding] fails to detect mpeg video stream whereas mplayer plays it properly
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Wed Apr 30 14:01:03 PDT 2008
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=526173
GStreamer | gst-plugins-base | Ver: HEAD CVS
Tim-Philipp Müller changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #108612|none |rejected
Flag| |
Status|NEEDINFO |RESOLVED
Resolution| |FIXED
Summary|typefind fail to detect mpeg|[typefinding] fails to
|stream whereas mplayer plays|detect mpeg video stream
|it properly |whereas mplayer plays it
| |properly
Target Milestone|HEAD |0.10.20
------- Comment #5 from Tim-Philipp Müller 2008-04-30 21:01 UTC -------
This should fix it:
2008-04-30 Tim-Philipp Müller <tim.muller at collabora co uk>
* 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.
The function your patching shouldn't really be needed at all (I've removed it
now), mpeg_video_stream_type_find() should pick it up.
But even if not, your patch isn't really ideal, since it calls
gst_typefind_peek() not less than a hundred thousand something times (!) in the
worst case, e.g. if this is not an mpeg video stream and there wasn't random
data that happens to look like a sequence header and no other typefinder
short-circuited the typefinding process with a PRIMARY probability.
Please re-open if this doesn't fix it for the full file. Thanks!
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=526173.
More information about the Gstreamer-bugs
mailing list