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:
parent
a8a2b9c717
commit
9fa3d7a294
@ -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>
|
2008-05-08 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
Patch by: Wouter Cloetens <zombie at e2big dot org>
|
Patch by: Wouter Cloetens <zombie at e2big dot org>
|
||||||
|
@ -1588,6 +1588,9 @@ h264_video_type_find (GstTypeFind * tf, gpointer unused)
|
|||||||
|
|
||||||
while (offset < H264_MAX_PROBE_LENGTH) {
|
while (offset < H264_MAX_PROBE_LENGTH) {
|
||||||
data = gst_type_find_peek (tf, offset, 4);
|
data = gst_type_find_peek (tf, offset, 4);
|
||||||
|
if (data == NULL)
|
||||||
|
goto done;
|
||||||
|
|
||||||
if (data && IS_MPEG_HEADER (data)) {
|
if (data && IS_MPEG_HEADER (data)) {
|
||||||
nut = data[3] & 0x9f; /* forbiden_zero_bit | nal_unit_type */
|
nut = data[3] & 0x9f; /* forbiden_zero_bit | nal_unit_type */
|
||||||
ref = data[3] & 0x60; /* nal_ref_idc */
|
ref = data[3] & 0x60; /* nal_ref_idc */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user