aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2011-12-20 13:17:03 +0100
committerStefano Sabatini <stefasab@gmail.com>2011-12-20 13:19:26 +0100
commit4d475f7eb3969a378f1c2722118c57b62d2ac461 (patch)
tree2c4bb383e7b51fce0906ccdd56a7e78c3fd764d4
parentaa1c590b29d30b11c2f4830e6bc08e8f936f557f (diff)
downloadffmpeg-4d475f7eb3969a378f1c2722118c57b62d2ac461.tar.gz
lavd/lavfi: add check in case pix_fmts cannot be allocated in lavfi_read_header()
-rw-r--r--libavdevice/lavfi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 6b72187d0c..ed37f23267 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -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");