]> git.sesse.net Git - ffmpeg/commitdiff
adpcmenc: check for coded_frame allocation failure
authorJustin Ruggles <justin.ruggles@gmail.com>
Mon, 30 Jan 2012 18:03:01 +0000 (13:03 -0500)
committerJustin Ruggles <justin.ruggles@gmail.com>
Tue, 31 Jan 2012 00:12:55 +0000 (19:12 -0500)
libavcodec/adpcmenc.c

index 9cf1e3914907e82a0319c29040b7643e55102260..26d673d4b5eea9f92ca36a94e939e2f704e4b264 100644 (file)
@@ -135,7 +135,8 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
         goto error;
     }
 
-    avctx->coded_frame = avcodec_alloc_frame();
+    if (!(avctx->coded_frame = avcodec_alloc_frame()))
+        goto error;
 
     return 0;
 error: