]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pcx.c
latm: Always reconfigure if no extradata was set previously
[ffmpeg] / libavcodec / pcx.c
index 1a5357b012873b734e8fa363b0dbdbd047560a24..61c971e073f2e400dba95482c9862f2e344de284 100644 (file)
@@ -109,7 +109,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
     nplanes            = buf[65];
     bytes_per_scanline = nplanes * bytes_per_line;
 
-    if (bytes_per_scanline < w * bits_per_pixel * nplanes / 8 ||
+    if (bytes_per_scanline < (w * bits_per_pixel * nplanes + 7) / 8 ||
         (!compressed && bytes_per_scanline > buf_size / h)) {
         av_log(avctx, AV_LOG_ERROR, "PCX data is corrupted\n");
         return AVERROR_INVALIDDATA;