summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-23 14:53:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-23 14:54:57 +0200
commita51f3b53fe7f96a15af4dd6fbdb9a084e89a4321 (patch)
tree9281fe4657f6fd3c550dce9ca984e4193f416d54 /libavcodec
parent552945efe62d0b6605efa2f5ad7b788c728d71b5 (diff)
avcodec/vc1dec: Fix return code on malloc() failure from ff_vc1_decode_init_alloc_tables()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vc1dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index e992640f05..1f090339a0 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5534,7 +5534,8 @@ av_cold int ff_vc1_decode_init_alloc_tables(VC1Context *v)
if (s->avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || s->avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
for (i = 0; i < 4; i++)
- if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width))) return -1;
+ if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width)))
+ return AVERROR(ENOMEM);
}
if (!v->mv_type_mb_plane || !v->direct_mb_plane || !v->acpred_plane || !v->over_flags_plane ||