]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/tiff: Replace width overriding for bayer by assert
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 15 Feb 2020 15:42:07 +0000 (16:42 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 29 Apr 2020 21:42:36 +0000 (23:42 +0200)
This is less confusing

Reviewed-by: Nick Renieris <velocityra@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/tiff.c

index 5bdcac2006a415345ecf825f92bfd9dec5f00eb2..39f5234d60248ab3a92b15acf3e0b8e216cff544 100644 (file)
@@ -589,7 +589,7 @@ static int tiff_unpack_strip(TiffContext *s, AVFrame *p, uint8_t *dst, int strid
         av_assert0(s->bpp == 24);
     }
     if (s->is_bayer) {
-        width = (s->bpp * s->width + 7) >> 3;
+        av_assert0(width == (s->bpp * s->width + 7) >> 3);
     }
     if (p->format == AV_PIX_FMT_GRAY12) {
         av_fast_padded_malloc(&s->yuv_line, &s->yuv_line_size, width);