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:
Reynaldo H. Verdejo Pinochet 2013-11-14 01:53:31 -03:00
parent 76985c5e81
commit 8d9dc05245

View file

@ -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;