Browse Source

msrle: correctly round linesize for < 8 bpp formats.

Fixes trac issue #338.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
tags/n0.9
Reimar Döffinger 14 years ago
parent
commit
4fe796b32a
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/msrle.c

+ 1
- 1
libavcodec/msrle.c View File

@@ -107,7 +107,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,


/* FIXME how to correctly detect RLE ??? */ /* FIXME how to correctly detect RLE ??? */
if (avctx->height * istride == avpkt->size) { /* assume uncompressed */ 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 *ptr = s->frame.data[0];
uint8_t *buf = avpkt->data + (avctx->height-1)*istride; uint8_t *buf = avpkt->data + (avctx->height-1)*istride;
int i, j; int i, j;


Loading…
Cancel
Save