avfilter/geq: assert on pixel format descriptor

inlink->format is supposed to be set to a valid format controlled by query_formats().
pull/138/head
Clément Bœsch 10 years ago
parent 45babb0121
commit a056636c81
  1. 3
      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;

Loading…
Cancel
Save