dcaparse: do not accept header with invalid channel count

https://bugzilla.gnome.org/show_bug.cgi?id=737928
This commit is contained in:
Matej Knopp 2014-10-05 15:51:18 +02:00 committed by Edward Hervey
parent 65536f25dd
commit 61ba778347

View file

@ -245,7 +245,7 @@ gst_dca_parse_parse_header (GstDcaParse * dcaparse,
if (chans < G_N_ELEMENTS (channels_table)) if (chans < G_N_ELEMENTS (channels_table))
*channels = channels_table[chans] + ((lfe) ? 1 : 0); *channels = channels_table[chans] + ((lfe) ? 1 : 0);
else else
*channels = 0; return FALSE;
if (depth) if (depth)
*depth = (marker == 0x1FFFE800 || marker == 0xFF1F00E8) ? 14 : 16; *depth = (marker == 0x1FFFE800 || marker == 0xFF1F00E8) ? 14 : 16;