Commit 1ac27690 authored by Paul B Mahol's avatar Paul B Mahol

avcodec/adx_parser: make packet split work if nb_channels is set

parent c5effe7d
......@@ -73,6 +73,16 @@ static int adx_parse(AVCodecParserContext *s1,
s->remaining = 0;
} else
s->remaining -= buf_size;
} else if (avctx->ch_layout.nb_channels > 0) {
if (!s->block_size)
s->block_size = avctx->ch_layout.nb_channels * BLOCK_SIZE;
if (!s->remaining)
s->remaining = s->block_size;
if (s->remaining <= buf_size) {
next = s->remaining;
s->remaining = 0;
} else
s->remaining -= buf_size;
}
if (ff_combine_frame(pc, next, &buf, &buf_size) < 0 || !buf_size) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment