]> git.sesse.net Git - ffmpeg/commitdiff
h264: check one context_init() allocation
authorVittorio Giovara <vittorio.giovara@gmail.com>
Fri, 2 Aug 2013 16:36:28 +0000 (18:36 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sat, 10 Aug 2013 11:36:38 +0000 (13:36 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/h264.c

index d4f04c62989961fa4f321ef009b1ec225d4dbaee..77f4fc091ac47939baa43a3b95b1f26f1c2e4607 100644 (file)
@@ -1637,7 +1637,11 @@ static int decode_update_thread_context(AVCodecContext *dst,
             av_log(dst, AV_LOG_ERROR, "Could not allocate memory for h264\n");
             return ret;
         }
-        context_init(h);
+        ret = context_init(h);
+        if (ret < 0) {
+            av_log(dst, AV_LOG_ERROR, "context_init() failed.\n");
+            return ret;
+        }
 
         for (i = 0; i < 2; i++) {
             h->rbsp_buffer[i]      = NULL;