Browse Source

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: Michael Niedermayer <michaelni@gmx.at>
tags/n2.8
Michael Niedermayer 10 years ago
parent
commit
3dea13e710
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/jpeg2000dec.c

+ 2
- 0
libavcodec/jpeg2000dec.c View File

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


Loading…
Cancel
Save