avfilter/geq: assert on pixel format descriptor

inlink->format is supposed to be set to a valid format controlled by query_formats().
This commit is contained in:
Clément Bœsch 2015-06-13 20:49:32 +02:00
parent 45babb0121
commit a056636c81

View File

@ -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;