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 6b72187..ed37f23 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");