flacparse: fixup 0.11 port of suspect frame checking
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 30 Aug 2012 09:30:01 +0000 (11:30 +0200)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Thu, 30 Aug 2012 09:30:01 +0000 (11:30 +0200)
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=682959

gst/audioparsers/gstflacparse.c

index 6df2d8452768bef5af53a68c885e148810fb34fa..4a34ebd3c1d497910b1fd6e0e11774c1a8ad1d6b 100644 (file)
@@ -681,7 +681,7 @@ gst_flac_parse_frame_is_valid (GstFlacParse * flacparse,
           gst_flac_parse_frame_header_is_valid (flacparse, map.data + i,
           remaining, FALSE, NULL, &suspect_end);
       if (header_ret == FRAME_HEADER_VALID) {
-        if (flacparse->check_frame_checksums) {
+        if (flacparse->check_frame_checksums || suspect_start || suspect_end) {
           guint16 actual_crc = gst_flac_calculate_crc16 (map.data, i - 2);
           guint16 expected_crc = GST_READ_UINT16_BE (map.data + i - 2);