diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-12 23:40:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-13 21:33:18 +0200 |
commit | a98d4d5207502a6dace278e69db288da0c192a28 (patch) | |
tree | f3e7677f1430c907b509ea324e6cc0a3d43f63b0 /libavfilter | |
parent | 897805286913feac6bac6aba6fbfca7d1d4e5824 (diff) | |
download | ffmpeg-a98d4d5207502a6dace278e69db288da0c192a28.tar.gz |
avfilter/drawutils: Assert av_pix_fmt_desc_get() return value in ff_fill_line_with_color()
Theres currently no case where this could be triggered
Found-by: Daemon404
Reviewed-by: Nicolas George <george@nsup.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/drawutils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c index 3a1abbd95a..5a82b10cd6 100644 --- a/libavfilter/drawutils.c +++ b/libavfilter/drawutils.c @@ -21,6 +21,7 @@ #include <string.h> +#include "libavutil/avassert.h" #include "libavutil/avutil.h" #include "libavutil/colorspace.h" #include "libavutil/mem.h" @@ -66,7 +67,11 @@ int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, uint8_t uint8_t rgba_map[4] = {0}; int i; const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(pix_fmt); - int hsub = pix_desc->log2_chroma_w; + int hsub; + + av_assert0(pix_desc); + + hsub = pix_desc->log2_chroma_w; *is_packed_rgba = ff_fill_rgba_map(rgba_map, pix_fmt) >= 0; |