summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/apedec.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 0bee9d83f1..a81767307a 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -262,9 +262,8 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
for (i = 0; i < APE_FILTER_LEVELS; i++) {
if (!ape_filter_orders[s->fset][i])
break;
- FF_ALLOC_OR_GOTO(avctx, s->filterbuf[i],
- (ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4,
- filter_alloc_fail);
+ if (!(s->filterbuf[i] = av_malloc((ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4)))
+ return AVERROR(ENOMEM);
}
if (s->fileversion < 3860) {
@@ -300,8 +299,6 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
return 0;
-filter_alloc_fail:
- return AVERROR(ENOMEM);
}
/**