mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 13:56:32 +00:00
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>
This commit is contained in:
parent
c4cd94f465
commit
b9011f3541
1 changed files with 2 additions and 2 deletions
|
@ -377,7 +377,7 @@ gst_flac_parse_stop (GstBaseParse * parse)
|
||||||
return TRUE;
|
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] = {
|
static const guint16 blocksize_table[16] = {
|
||||||
0, 192, 576 << 0, 576 << 1, 576 << 2, 576 << 3, 0, 0,
|
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 */
|
/* bits per sample */
|
||||||
bps = gst_bit_reader_get_bits_uint8_unchecked (&reader, 3);
|
bps = gst_bit_reader_get_bits_uint8_unchecked (&reader, 3);
|
||||||
if (bps == 0x03 || bps == 0x07) {
|
if (bps == 0x03) {
|
||||||
goto error;
|
goto error;
|
||||||
} else if (bps == 0 && flacparse->bps == 0) {
|
} else if (bps == 0 && flacparse->bps == 0) {
|
||||||
goto need_streaminfo;
|
goto need_streaminfo;
|
||||||
|
|
Loading…
Reference in a new issue