mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
ac3parse: relax bsid checking
... to the widest possible spec interpretation. Fixes #637062.
This commit is contained in:
parent
25007c3c9d
commit
01e9b677a8
1 changed files with 5 additions and 2 deletions
|
@ -262,10 +262,13 @@ gst_ac3_parse_frame_header_ac3 (GstAc3Parse * ac3parse, GstBuffer * buf,
|
||||||
bsmod = gst_bit_reader_get_bits_uint8_unchecked (&bits, 3);
|
bsmod = gst_bit_reader_get_bits_uint8_unchecked (&bits, 3);
|
||||||
acmod = gst_bit_reader_get_bits_uint8_unchecked (&bits, 3);
|
acmod = gst_bit_reader_get_bits_uint8_unchecked (&bits, 3);
|
||||||
|
|
||||||
/* FIXME: are other bsids ok as well? check spec */
|
/* spec not quite clear here: decoder should decode if less than 8,
|
||||||
if (bsid != 8 && bsid != 6) {
|
* but seemingly only defines 6 and 8 cases */
|
||||||
|
if (bsid > 8) {
|
||||||
GST_DEBUG_OBJECT (ac3parse, "unexpected bsid=%d", bsid);
|
GST_DEBUG_OBJECT (ac3parse, "unexpected bsid=%d", bsid);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
} else if (bsid != 8 && bsid != 6) {
|
||||||
|
GST_DEBUG_OBJECT (ac3parse, "undefined bsid=%d", bsid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((acmod & 0x1) && (acmod != 0x1)) /* 3 front channels */
|
if ((acmod & 0x1) && (acmod != 0x1)) /* 3 front channels */
|
||||||
|
|
Loading…
Reference in a new issue