summaryrefslogtreecommitdiff
path: root/libavfilter/vf_geq.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2015-06-13 20:49:32 +0200
committerClément Bœsch <u@pkh.me>2015-06-13 20:51:43 +0200
commita056636c8131d2e6ca6a8f3b196287af682b16a4 (patch)
treeec9354d4ddc95d217f927a045678dc76b674dbab /libavfilter/vf_geq.c
parent45babb01217f4cf776c50f1bec8ced0065277c89 (diff)
downloadffmpeg-a056636c8131d2e6ca6a8f3b196287af682b16a4.tar.gz
avfilter/geq: assert on pixel format descriptor
inlink->format is supposed to be set to a valid format controlled by query_formats().
Diffstat (limited to 'libavfilter/vf_geq.c')
-rw-r--r--libavfilter/vf_geq.c3
1 files changed, 3 insertions, 0 deletions
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;