Commit 3dea13e7 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/jpeg2000dec: Assert that pixel format descriptor is not NULL

We only look up pixel formats from a fixed list so none should ever
fail to be found
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d59a033a
......@@ -171,6 +171,8 @@ static int pix_fmt_match(enum AVPixelFormat pix_fmt, int components,
int match = 1;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
av_assert2(desc);
if (desc->nb_components != components) {
return 0;
}
......
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