mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/mpegvideo: simplify check for av_frame_alloc
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
parent
44863b2c2d
commit
d3b2961200
@ -941,17 +941,10 @@ av_cold int ff_mpv_common_init(MpegEncContext *s)
|
||||
if (!s->picture[i].f)
|
||||
goto fail_nomem;
|
||||
}
|
||||
s->next_picture.f = av_frame_alloc();
|
||||
if (!s->next_picture.f)
|
||||
goto fail_nomem;
|
||||
s->last_picture.f = av_frame_alloc();
|
||||
if (!s->last_picture.f)
|
||||
goto fail_nomem;
|
||||
s->current_picture.f = av_frame_alloc();
|
||||
if (!s->current_picture.f)
|
||||
goto fail_nomem;
|
||||
s->new_picture.f = av_frame_alloc();
|
||||
if (!s->new_picture.f)
|
||||
if (!(s->next_picture.f = av_frame_alloc()) ||
|
||||
!(s->last_picture.f = av_frame_alloc()) ||
|
||||
!(s->current_picture.f = av_frame_alloc()) ||
|
||||
!(s->new_picture.f = av_frame_alloc()))
|
||||
goto fail_nomem;
|
||||
|
||||
if ((ret = init_context_frame(s)))
|
||||
|
Loading…
Reference in New Issue
Block a user