mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avcodec/avrndec: Check allocation for success
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
b0a29d88c8
commit
d8e4d26de6
@ -54,6 +54,8 @@ static av_cold int init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
a->mjpeg_avctx = avcodec_alloc_context3(codec);
|
||||
if (!a->mjpeg_avctx)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
av_dict_set(&thread_opt, "threads", "1", 0); // Is this needed ?
|
||||
a->mjpeg_avctx->refcounted_frames = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user