mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
avcodec/adxdec: add support for 6 channels
This commit is contained in:
parent
fdd123de13
commit
39f6d9c5c1
2 changed files with 4 additions and 2 deletions
|
|
@ -35,9 +35,11 @@ typedef struct ADXChannelState {
|
|||
int s1,s2;
|
||||
} ADXChannelState;
|
||||
|
||||
#define MAX_CHANNELS 6
|
||||
|
||||
typedef struct ADXContext {
|
||||
int channels;
|
||||
ADXChannelState prev[2];
|
||||
ADXChannelState prev[MAX_CHANNELS];
|
||||
int header_parsed;
|
||||
int eof;
|
||||
int cutoff;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ static int adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
|
|||
|
||||
/* channels */
|
||||
channels = buf[7];
|
||||
if (channels <= 0 || channels > 2)
|
||||
if (channels <= 0 || channels > MAX_CHANNELS)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (avctx->ch_layout.nb_channels != channels) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue