diff --git a/ChangeLog b/ChangeLog index 24c23d02bc..fc53a78431 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-15 Edward Hervey + + * gst/typefind/gsttypefindfunctions.c: (flac_type_find): + Don't forget to advance the offset of what we're matching against, else + we end up in a forever loop. + 2008-10-15 Sebastian Dröge * gst/subparse/gstsubparse.c: (gst_subparse_type_find): diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 49205757e2..a36e32a1cf 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -547,31 +547,32 @@ flac_type_find (GstTypeFind * tf, gpointer unused) if (data[0] == 0xff && (data[1] >> 2) == 0x3e) { /* bit 15 must be 0 */ if (((data[1] >> 1) & 0x01) == 0x01) - continue; + goto advance; /* blocksize must be != 0x00 */ if ((data[2] >> 4) == 0x00) - continue; + goto advance; /* samplerate must be != 0x0f */ if ((data[2] & 0x0f) == 0x0f) - continue; + goto advance; /* channel assignment must be < 11 */ if ((data[3] >> 4) >= 11) - continue; + goto advance; /* sample size must be != 0x07 */ if (((data[3] >> 1) & 0x07) == 0x07) - continue; + goto advance; /* next bit must be 0 */ if ((data[3] & 0x01) == 0x01) - continue; + goto advance; gst_type_find_suggest (tf, GST_TYPE_FIND_LIKELY, FLAC_CAPS); return; } + advance: data_scan_ctx_advance (tf, &c, 1); } }