diff options
author | Philippe Normand <philn@igalia.com> | 2022-12-04 11:44:17 +0000 |
---|---|---|
committer | Philippe Normand <philn@igalia.com> | 2022-12-04 11:47:57 +0000 |
commit | b9011f3541e1da518df5b0857547d833555cc49e (patch) | |
tree | cdb44bdeeb6e03aeef5db4f97049b6b4e8b41265 | |
parent | c4cd94f465c0276e201d0fb8b1377ea56d6c2f33 (diff) | |
download | gstreamer-b9011f3541e1da518df5b0857547d833555cc49e.tar.gz |
flacparse: Fix handling of headers advertising 32bps
According to the flac bitstream format specification, the sample size in bits
corresponding to `111` is 32 bits per sample.
https://xiph.org/flac/format.html#frame_header
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3517>
-rw-r--r-- | subprojects/gst-plugins-good/gst/audioparsers/gstflacparse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subprojects/gst-plugins-good/gst/audioparsers/gstflacparse.c b/subprojects/gst-plugins-good/gst/audioparsers/gstflacparse.c index 8fca410899..a53b7ebc77 100644 --- a/subprojects/gst-plugins-good/gst/audioparsers/gstflacparse.c +++ b/subprojects/gst-plugins-good/gst/audioparsers/gstflacparse.c @@ -377,7 +377,7 @@ gst_flac_parse_stop (GstBaseParse * parse) return TRUE; } -static const guint8 sample_size_table[] = { 0, 8, 12, 0, 16, 20, 24, 0 }; +static const guint8 sample_size_table[] = { 0, 8, 12, 0, 16, 20, 24, 32 }; static const guint16 blocksize_table[16] = { 0, 192, 576 << 0, 576 << 1, 576 << 2, 576 << 3, 0, 0, @@ -449,7 +449,7 @@ gst_flac_parse_frame_header_is_valid (GstFlacParse * flacparse, /* bits per sample */ bps = gst_bit_reader_get_bits_uint8_unchecked (&reader, 3); - if (bps == 0x03 || bps == 0x07) { + if (bps == 0x03) { goto error; } else if (bps == 0 && flacparse->bps == 0) { goto need_streaminfo; |