aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2020-06-02 23:49:28 +0800
committerLimin Wang <lance.lmwang@gmail.com>2020-06-13 06:59:19 +0800
commit70ad0b27c17b4f220a6b99a3e80d51ed82afdf6d (patch)
treeafb2d51959fa7fd90d06bbd4aa390e6318da1321
parent734e6a81b6925b7335020a8d7cf9214c42df8b71 (diff)
downloadffmpeg-70ad0b27c17b4f220a6b99a3e80d51ed82afdf6d.tar.gz
avcodec/mpegpicture: remove FF_ALLOCZ_ARRAY_OR_GOTO and gotos label
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
-rw-r--r--libavcodec/mpegpicture.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
index be90ece589..83426bbda6 100644
--- a/libavcodec/mpegpicture.c
+++ b/libavcodec/mpegpicture.c
@@ -78,19 +78,15 @@ int ff_mpeg_framesize_alloc(AVCodecContext *avctx, MotionEstContext *me,
// at uvlinesize. It supports only YUV420 so 24x24 is enough
// linesize * interlaced * MBsize
// we also use this buffer for encoding in encode_mb_internal() needig an additional 32 lines
- FF_ALLOCZ_ARRAY_OR_GOTO(avctx, sc->edge_emu_buffer, alloc_size, EMU_EDGE_HEIGHT,
- fail);
-
- FF_ALLOCZ_ARRAY_OR_GOTO(avctx, me->scratchpad, alloc_size, 4 * 16 * 2,
- fail)
+ if (!FF_ALLOCZ_TYPED_ARRAY(sc->edge_emu_buffer, alloc_size * EMU_EDGE_HEIGHT) ||
+ !FF_ALLOCZ_TYPED_ARRAY(me->scratchpad, alloc_size * 4 * 16 * 2))
+ return AVERROR(ENOMEM);
me->temp = me->scratchpad;
sc->rd_scratchpad = me->scratchpad;
sc->b_scratchpad = me->scratchpad;
sc->obmc_scratchpad = me->scratchpad + 16;
return 0;
-fail:
- return AVERROR(ENOMEM);
}
/**