Browse Source

avutil/imgutils: Simplify pix_fmt validity check in av_image_get_linesize()

Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.8
Michael Niedermayer 10 years ago
parent
commit
ea37df2d52
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavutil/imgutils.c

+ 1
- 1
libavutil/imgutils.c View File

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


Loading…
Cancel
Save