avcodec/dca: clear X96 channels if nothing was decoded
authorfoo86 <foobaz86@gmail.com>
Wed, 2 Mar 2016 19:31:10 +0000 (22:31 +0300)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 6 Mar 2016 17:24:20 +0000 (18:24 +0100)
The first X96 channel set can have more channels than core, causing X96
decoding to be skipped. Clear the number of decoded X96 channels to zero
in this rudimentary case.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/dca_core.c

index 48a8f61..d9f1a4c 100644 (file)
@@ -1760,6 +1760,7 @@ static int parse_x96_frame_exss(DCACoreDecoder *s)
         return ret;
 
     // Channel set data
+    s->x96_nchannels = 0;
     for (i = 0, x96_base_ch = 0; i < x96_nchsets; i++) {
         header_pos = get_bits_count(&s->gb);