Browse Source

avcodec/avrndec: Check allocation for success

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
tags/n4.4
Andreas Rheinhardt 5 years ago
parent
commit
d8e4d26de6
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/avrndec.c

+ 2
- 0
libavcodec/avrndec.c View File

@@ -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…
Cancel
Save