Commit a056636c authored by Clément Bœsch's avatar Clément Bœsch

avfilter/geq: assert on pixel format descriptor

inlink->format is supposed to be set to a valid format controlled by query_formats().
parent 45babb01
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment