Ticket #1217: patchzlibenc.diff

File patchzlibenc.diff, 592 bytes (added by Carl Eugen Hoyos, 15 years ago)
  • libavcodec/lclenc.c

    diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
    index 16976ea..5be1ac4 100644
    a b static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,  
    100100
    101101    for(i = avctx->height - 1; i >= 0; i--) {
    102102        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 & 1);
    104104        zret = deflate(&c->zstream, Z_NO_FLUSH);
    105105        if (zret != Z_OK) {
    106106            av_log(avctx, AV_LOG_ERROR, "Deflate error: %d\n", zret);