mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
typefind: Fix identification of some MPEG files
Make sure we begin by peeking at MPEG2_MAX_PROBE_LENGTH bytes. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=678011
This commit is contained in:
parent
76985c5e81
commit
8d9dc05245
1 changed files with 6 additions and 3 deletions
|
@ -2178,10 +2178,13 @@ mpeg_sys_type_find (GstTypeFind * tf, gpointer unused)
|
||||||
gint len;
|
gint len;
|
||||||
|
|
||||||
len = MPEG2_MAX_PROBE_LENGTH;
|
len = MPEG2_MAX_PROBE_LENGTH;
|
||||||
do {
|
|
||||||
len = len / 2;
|
while (len >= 16) {
|
||||||
data = gst_type_find_peek (tf, 0, 5 + len);
|
data = gst_type_find_peek (tf, 0, 5 + len);
|
||||||
} while (data == NULL && len >= 32);
|
if (data != NULL)
|
||||||
|
break;
|
||||||
|
len = len / 2;
|
||||||
|
}
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue