[FFmpeg-cvslog] avcodec/jpeg2000dec: Assert that pixel format descriptor is not NULL

Michael Niedermayer git at videolan.org
Fri Jun 12 15:29:58 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jun 12 14:33:53 2015 +0200| [3dea13e710ce525375c5458fe16d6df80bd02517] | committer: 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: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3dea13e710ce525375c5458fe16d6df80bd02517
---

 libavcodec/jpeg2000dec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 6cd646a..c0a8b1f 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -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;
     }



More information about the ffmpeg-cvslog mailing list