From a056636c8131d2e6ca6a8f3b196287af682b16a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Sat, 13 Jun 2015 20:49:32 +0200 Subject: [PATCH] avfilter/geq: assert on pixel format descriptor inlink->format is supposed to be set to a valid format controlled by query_formats(). --- libavfilter/vf_geq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index 887594f866..40e71e05de 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter/vf_geq.c @@ -26,6 +26,7 @@ * ported by Clément Bœsch for FFmpeg. */ +#include "libavutil/avassert.h" #include "libavutil/avstring.h" #include "libavutil/eval.h" #include "libavutil/opt.h" @@ -192,6 +193,8 @@ static int geq_config_props(AVFilterLink *inlink) GEQContext *geq = inlink->dst->priv; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); + av_assert0(desc); + geq->hsub = desc->log2_chroma_w; geq->vsub = desc->log2_chroma_h; geq->planes = desc->nb_components;