diff --git a/ChangeLog b/ChangeLog index 27af700ecc..8592f51e43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-08 Edward Hervey + + * 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 Patch by: Wouter Cloetens diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index c8b706a4ca..d1116a4b32 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -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 */