Index: apps/codecs/libffmpegFLAC/decoder.c =================================================================== --- apps/codecs/libffmpegFLAC/decoder.c (Revision 31201) +++ apps/codecs/libffmpegFLAC/decoder.c (Arbeitskopie) @@ -96,6 +96,8 @@ 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3 }; +static int32_t dummy[MAX_BLOCKSIZE]; /* Holds unused output if decoding multichannel */ + static int64_t get_utf8(GetBitContext *gb) ICODE_ATTR_FLAC; static int64_t get_utf8(GetBitContext *gb) { @@ -478,16 +480,25 @@ s->decorrelation= decorrelation; yield(); - /* subframes */ + if ((res=decode_subframe(s, 0, decoded0)) < 0) return res-100; yield(); - if (s->channels==2) { + if (s->channels>=2) { if ((res=decode_subframe(s, 1, decoded1)) < 0) return res-200; } + + if (s->channels>2) { + int ch; + for (ch=2; chchannels; ++ch) { + yield(); + if ((res=decode_subframe(s, ch, dummy)) < 0) + return res-300; + } + } yield(); align_get_bits(&s->gb);