X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libavcodec%2Fadx_parser.c;h=62b4415bc193e710a7e73f4a7d9462bc9ea58e87;hb=2b01b7918beebe7b392ebf255f887e396a59e4c6;hp=52aa14b7ad377fbe94d7a015fd910adc360cbe9e;hpb=55e5af3c03898ffbac352fe4af83208fa4129c71;p=platform%2Fupstream%2Fffmpeg.git diff --git a/libavcodec/adx_parser.c b/libavcodec/adx_parser.c index 52aa14b..62b4415 100644 --- a/libavcodec/adx_parser.c +++ b/libavcodec/adx_parser.c @@ -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) {