summaryrefslogtreecommitdiff
path: root/libavcodec/mace.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-17 15:16:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-17 15:16:01 +0200
commit7163bbefa26d634eae7bac8f0d891f2bca270eb9 (patch)
tree9435643e06f694e96a038fd78381057c94c1aafd /libavcodec/mace.c
parenta64b99503b962c757908e6796fc224aae23732ae (diff)
parente1f3847f860a1094a46be4c5f10db8df616c3135 (diff)
Merge commit 'e1f3847f860a1094a46be4c5f10db8df616c3135'
* commit 'e1f3847f860a1094a46be4c5f10db8df616c3135': mace: Make sure that the channel count is set to a valid value Conflicts: libavcodec/mace.c See: 6df1cfa7e4d488051d7b5033c0c69df970db9f82 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mace.c')
-rw-r--r--libavcodec/mace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mace.c b/libavcodec/mace.c
index 94bf2e7ef8..c4e98ea4c6 100644
--- a/libavcodec/mace.c
+++ b/libavcodec/mace.c
@@ -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)
{
- if (avctx->channels > 2 || avctx->channels <= 0)
- return -1;
+ if (avctx->channels > 2 || avctx->channels < 1)
+ return AVERROR(EINVAL);
avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
return 0;