gst/typefind/gsttypefindfunctions.c: Abort the h264 typefinding as soon as _peek() doesn't return anything, which hap...

Original commit message from CVS:
* gst/typefind/gsttypefindfunctions.c: (h264_video_type_find):
Abort the h264 typefinding as soon as _peek() doesn't return anything,
which happens for example with files smaller than 128kb.
This commit is contained in:
Edward Hervey 2008-05-08 17:35:44 +00:00
parent a8a2b9c717
commit 9fa3d7a294
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2008-05-08 Edward Hervey <edward.hervey@collabora.co.uk>
* gst/typefind/gsttypefindfunctions.c: (h264_video_type_find):
Abort the h264 typefinding as soon as _peek() doesn't return anything,
which happens for example with files smaller than 128kb.
2008-05-08 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Wouter Cloetens <zombie at e2big dot org>

View file

@ -1588,6 +1588,9 @@ h264_video_type_find (GstTypeFind * tf, gpointer unused)
while (offset < H264_MAX_PROBE_LENGTH) {
data = gst_type_find_peek (tf, offset, 4);
if (data == NULL)
goto done;
if (data && IS_MPEG_HEADER (data)) {
nut = data[3] & 0x9f; /* forbiden_zero_bit | nal_unit_type */
ref = data[3] & 0x60; /* nal_ref_idc */