diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 65feb1a..fed1a53 100644
|
a
|
b
|
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac |
| 415 | 415 | for (row = height - 1; row >= 0; row--) { |
| 416 | 416 | pixel_ptr = row * c->pic.linesize[0]; |
| 417 | 417 | memcpy(outptr + pixel_ptr, encoded, 3 * width); |
| 418 | | encoded += 3 * width; |
| | 418 | encoded += 3 * width + (width & 3); |
| 419 | 419 | } |
| 420 | 420 | break; |
| 421 | 421 | case IMGTYPE_YUV411: |
| … |
… |
static av_cold int decode_init(AVCodecContext *avctx) |
| 512 | 512 | av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:2:2.\n"); |
| 513 | 513 | break; |
| 514 | 514 | case IMGTYPE_RGB24: |
| 515 | | c->decomp_size = basesize * 3; |
| | 515 | c->decomp_size = basesize * 3 + (avctx->width & 3) * avctx->height; |
| 516 | 516 | max_decomp_size = max_basesize * 3; |
| 517 | 517 | avctx->pix_fmt = PIX_FMT_BGR24; |
| 518 | 518 | av_log(avctx, AV_LOG_DEBUG, "Image type is RGB 24.\n"); |
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index 16976ea..f886e73 100644
|
a
|
b
|
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
| 100 | 100 | |
| 101 | 101 | for(i = avctx->height - 1; i >= 0; i--) { |
| 102 | 102 | c->zstream.next_in = p->data[0]+p->linesize[0]*i; |
| 103 | | c->zstream.avail_in = avctx->width*3; |
| | 103 | c->zstream.avail_in = avctx->width*3 + (avctx->width & 3); |
| 104 | 104 | zret = deflate(&c->zstream, Z_NO_FLUSH); |
| 105 | 105 | if (zret != Z_OK) { |
| 106 | 106 | av_log(avctx, AV_LOG_ERROR, "Deflate error: %d\n", zret); |