From 61fb7e17a25b62c3bbc9f72e3a23baca2a5beed9 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Tue, 20 Dec 2011 13:17:03 +0100 Subject: [PATCH] lavd/lavfi: add check in case pix_fmts cannot be allocated in lavfi_read_header() (cherry picked from commit 4d475f7eb3969a378f1c2722118c57b62d2ac461) Signed-off-by: Michael Niedermayer --- libavdevice/lavfi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c index 04dc3b233c..37c782a69c 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");