mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +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;
|
||||
|
||||
len = MPEG2_MAX_PROBE_LENGTH;
|
||||
do {
|
||||
len = len / 2;
|
||||
|
||||
while (len >= 16) {
|
||||
data = gst_type_find_peek (tf, 0, 5 + len);
|
||||
} while (data == NULL && len >= 32);
|
||||
if (data != NULL)
|
||||
break;
|
||||
len = len / 2;
|
||||
}
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue