X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmsrle.c;h=b9531f34d74558128f6bb552b31ea6a27f381775;hb=6c1fb3e7631178c2a45c6c41b9b8d9ee3a5298fc;hp=8f1f25966b7ed25d04e67808fe4e13c2a2d9a80c;hpb=84a6abd95420f6552c30b11ab5585fdb306269ba;p=ffmpeg diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index 8f1f25966b7..b9531f34d74 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -107,7 +107,7 @@ static int msrle_decode_frame(AVCodecContext *avctx, /* FIXME how to correctly detect RLE ??? */ if (avctx->height * istride == avpkt->size) { /* assume uncompressed */ - int linesize = avctx->width * avctx->bits_per_coded_sample / 8; + int linesize = (avctx->width * avctx->bits_per_coded_sample + 7) / 8; uint8_t *ptr = s->frame.data[0]; uint8_t *buf = avpkt->data + (avctx->height-1)*istride; int i, j;