mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avcodec/adx_parser: make packet split work if nb_channels is set
This commit is contained in:
parent
c5effe7d3d
commit
1ac2769009
1 changed files with 10 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue