avcodec/apedec: remove FF_ALLOC_OR_GOTO and gotos lable

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
Limin Wang 2020-06-01 21:26:53 +08:00
parent 4b2863ff01
commit 8a8802e9cb
1 changed files with 2 additions and 5 deletions

View File

@ -262,9 +262,8 @@ static av_cold int ape_decode_init(AVCodecContext *avctx)
for (i = 0; i < APE_FILTER_LEVELS; i++) { for (i = 0; i < APE_FILTER_LEVELS; i++) {
if (!ape_filter_orders[s->fset][i]) if (!ape_filter_orders[s->fset][i])
break; break;
FF_ALLOC_OR_GOTO(avctx, s->filterbuf[i], if (!(s->filterbuf[i] = av_malloc((ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4)))
(ape_filter_orders[s->fset][i] * 3 + HISTORY_SIZE) * 4, return AVERROR(ENOMEM);
filter_alloc_fail);
} }
if (s->fileversion < 3860) { 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; avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
return 0; return 0;
filter_alloc_fail:
return AVERROR(ENOMEM);
} }
/** /**