Revision cc26bf0d libavcodec/gif.c

View differences:

libavcodec/gif.c
84 84
}
85 85

  
86 86
static int gif_image_write_image(uint8_t **bytestream,
87
                                 int x1, int y1, int width, int height,
87
                                 int width, int height,
88 88
                                 const uint8_t *buf, int linesize, int pix_fmt)
89 89
{
90 90
    PutBitContext p;
......
94 94
    /* image block */
95 95

  
96 96
    bytestream_put_byte(bytestream, 0x2c);
97
    bytestream_put_le16(bytestream, x1);
98
    bytestream_put_le16(bytestream, y1);
97
    bytestream_put_le16(bytestream, 0);
98
    bytestream_put_le16(bytestream, 0);
99 99
    bytestream_put_le16(bytestream, width);
100 100
    bytestream_put_le16(bytestream, height);
101 101
    bytestream_put_byte(bytestream, 0x00); /* flags */
......
162 162
    p->pict_type = FF_I_TYPE;
163 163
    p->key_frame = 1;
164 164
    gif_image_write_header(&outbuf_ptr, avctx->width, avctx->height, (uint32_t *)pict->data[1]);
165
    gif_image_write_image(&outbuf_ptr, 0, 0, avctx->width, avctx->height, pict->data[0], pict->linesize[0], PIX_FMT_PAL8);
165
    gif_image_write_image(&outbuf_ptr, avctx->width, avctx->height, pict->data[0], pict->linesize[0], PIX_FMT_PAL8);
166 166
    return outbuf_ptr - outbuf;
167 167
}
168 168

  

Also available in: Unified diff