Commit 7163bbef authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'e1f3847f'

* commit 'e1f3847f':
  mace: Make sure that the channel count is set to a valid value

Conflicts:
	libavcodec/mace.c

See: 6df1cfa7Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents a64b9950 e1f3847f
...@@ -226,8 +226,8 @@ static void chomp6(ChannelData *chd, int16_t *output, uint8_t val, int tab_idx) ...@@ -226,8 +226,8 @@ static void chomp6(ChannelData *chd, int16_t *output, uint8_t val, int tab_idx)
static av_cold int mace_decode_init(AVCodecContext * avctx) static av_cold int mace_decode_init(AVCodecContext * avctx)
{ {
if (avctx->channels > 2 || avctx->channels <= 0) if (avctx->channels > 2 || avctx->channels < 1)
return -1; return AVERROR(EINVAL);
avctx->sample_fmt = AV_SAMPLE_FMT_S16P; avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment