From d0d588ff6f0bb377f12dc65c3ae16df2ffe00f16 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 13 Oct 2008 08:00:55 +0000 Subject: [PATCH] gst/typefind/gsttypefindfunctions.c: For looking at the 4th byte we have to get 4 bytes of course and not 3. Original commit message from CVS: * gst/typefind/gsttypefindfunctions.c: (flac_type_find): For looking at the 4th byte we have to get 4 bytes of course and not 3. --- ChangeLog | 6 ++++++ gst/typefind/gsttypefindfunctions.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b77c967..8719e98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ 2008-10-13 Sebastian Dröge * gst/typefind/gsttypefindfunctions.c: (flac_type_find): + For looking at the 4th byte we have to get 4 bytes of course + and not 3. + +2008-10-13 Sebastian Dröge + + * gst/typefind/gsttypefindfunctions.c: (flac_type_find): Improve FLAC-without-headers typefinding by looking at most of the frame header and checking if invalid values are used. Should prevent quite some false positives compared to the old version which only diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index a02981f..4920575 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -541,7 +541,7 @@ flac_type_find (GstTypeFind * tf, gpointer unused) /* flac without headers */ /* 64K should be enough */ while (c.offset < (64 * 1024)) { - if (G_UNLIKELY (!data_scan_ctx_ensure_data (tf, &c, 3))) + if (G_UNLIKELY (!data_scan_ctx_ensure_data (tf, &c, 4))) break; if (data[0] == 0xff && (data[1] >> 2) == 0x3e) { -- 2.7.4