comparison gif.c @ 10626:099e9b33c1b9 libavcodec

move private context declaration at the top
author bcoudurier
date Wed, 02 Dec 2009 21:01:12 +0000
parents 38cfe222e1a4
children 3c7adb462b65
comparison
equal deleted inserted replaced
10625:328e2a3171d2 10626:099e9b33c1b9
50 50
51 #include "put_bits.h" 51 #include "put_bits.h"
52 52
53 /* bitstream minipacket size */ 53 /* bitstream minipacket size */
54 #define GIF_CHUNKS 100 54 #define GIF_CHUNKS 100
55
56 typedef struct {
57 AVFrame picture;
58 } GIFContext;
55 59
56 /* GIF header */ 60 /* GIF header */
57 static int gif_image_write_header(uint8_t **bytestream, 61 static int gif_image_write_header(uint8_t **bytestream,
58 int width, int height, 62 int width, int height,
59 uint32_t *palette) 63 uint32_t *palette)
136 bytestream_put_byte(bytestream, 0x00); /* end of image block */ 140 bytestream_put_byte(bytestream, 0x00); /* end of image block */
137 bytestream_put_byte(bytestream, 0x3b); 141 bytestream_put_byte(bytestream, 0x3b);
138 return 0; 142 return 0;
139 } 143 }
140 144
141 typedef struct {
142 AVFrame picture;
143 } GIFContext;
144
145 static av_cold int gif_encode_init(AVCodecContext *avctx) 145 static av_cold int gif_encode_init(AVCodecContext *avctx)
146 { 146 {
147 GIFContext *s = avctx->priv_data; 147 GIFContext *s = avctx->priv_data;
148 148
149 avctx->coded_frame = &s->picture; 149 avctx->coded_frame = &s->picture;