mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
dpcm: check to make sure channels is 1 or 2.
This commit is contained in:
parent
4bad464e7f
commit
8d77d12a2b
@ -117,6 +117,11 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
|
|||||||
int i;
|
int i;
|
||||||
short square;
|
short square;
|
||||||
|
|
||||||
|
if (avctx->channels < 1 || avctx->channels > 2) {
|
||||||
|
av_log(avctx, AV_LOG_INFO, "invalid number of channels\n");
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
s->channels = avctx->channels;
|
s->channels = avctx->channels;
|
||||||
s->sample[0] = s->sample[1] = 0;
|
s->sample[0] = s->sample[1] = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user