#include "avcodec.h"
#include "libavutil/intreadwrite.h"
#include "get_bits.h"
+#include "internal.h"
#include "libavutil/crc.h"
#include "parser.h"
#include "mlp_parser.h"
cp->huff_lsbs = 24;
}
- if (substr == m->max_decoded_substream)
+ if (substr == m->max_decoded_substream &&
+ m->avctx->channels != s->max_matrix_channel + 1) {
m->avctx->channels = s->max_matrix_channel + 1;
+ m->avctx->channel_layout = 0;
+ }
return 0;
}
/* get output buffer */
m->frame.nb_samples = s->blockpos;
- if ((ret = avctx->get_buffer(avctx, &m->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &m->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}