X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Fimgutils.c;h=9c8216e827be06d88c7a8fa50e1ecfa623fa578a;hb=4299f085f45cdd8fcb3ecf681d9fef0c4b3fe207;hp=ef0e67154b83c5fbd6b67b6625a07d5075377deb;hpb=d1f7b313ac3476e4b00f550e470f9f8429919299;p=ffmpeg diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index ef0e67154b8..9c8216e827b 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -78,7 +78,7 @@ int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane) int max_step [4]; /* max pixel step for each plane */ int max_step_comp[4]; /* the component for each plane which has the max pixel step */ - if ((unsigned)pix_fmt >= AV_PIX_FMT_NB || desc->flags & AV_PIX_FMT_FLAG_HWACCEL) + if (!desc || desc->flags & AV_PIX_FMT_FLAG_HWACCEL) return AVERROR(EINVAL); av_image_fill_max_pixsteps(max_step, max_step_comp, desc);