You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/adxdec: add support for 6 channels
This commit is contained in:
@@ -35,9 +35,11 @@ typedef struct ADXChannelState {
|
|||||||
int s1,s2;
|
int s1,s2;
|
||||||
} ADXChannelState;
|
} ADXChannelState;
|
||||||
|
|
||||||
|
#define MAX_CHANNELS 6
|
||||||
|
|
||||||
typedef struct ADXContext {
|
typedef struct ADXContext {
|
||||||
int channels;
|
int channels;
|
||||||
ADXChannelState prev[2];
|
ADXChannelState prev[MAX_CHANNELS];
|
||||||
int header_parsed;
|
int header_parsed;
|
||||||
int eof;
|
int eof;
|
||||||
int cutoff;
|
int cutoff;
|
||||||
|
@@ -70,7 +70,7 @@ static int adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
|
|||||||
|
|
||||||
/* channels */
|
/* channels */
|
||||||
channels = buf[7];
|
channels = buf[7];
|
||||||
if (channels <= 0 || channels > 2)
|
if (channels <= 0 || channels > MAX_CHANNELS)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
if (avctx->ch_layout.nb_channels != channels) {
|
if (avctx->ch_layout.nb_channels != channels) {
|
||||||
|
Reference in New Issue
Block a user