avcodec/jpeg2000dec: Assert that pixel format descriptor is not NULL
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 12 Jun 2015 12:33:53 +0000 (14:33 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 12 Jun 2015 12:33:53 +0000 (14:33 +0200)
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>
libavcodec/jpeg2000dec.c

index 6cd646a..c0a8b1f 100644 (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;
     }