]> git.sesse.net Git - ffmpeg/commitdiff
lavd/lavfi: add check in case pix_fmts cannot be allocated in lavfi_read_header()
authorStefano Sabatini <stefasab@gmail.com>
Tue, 20 Dec 2011 12:17:03 +0000 (13:17 +0100)
committerStefano Sabatini <stefasab@gmail.com>
Tue, 20 Dec 2011 12:19:26 +0000 (13:19 +0100)
libavdevice/lavfi.c

index 6b72187d0ced5b7ce2d980f74380ebf1e021162e..ed37f23267a6a84e071d05fb9746f7d8792867db 100644 (file)
@@ -88,6 +88,9 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx,
 
 #define FAIL(ERR) { ret = ERR; goto end; }
 
+    if (!pix_fmts)
+        FAIL(AVERROR(ENOMEM));
+
     avfilter_register_all();
 
     buffersink = avfilter_get_by_name("buffersink");