Mercurial > libavcodec.hg
comparison c93.c @ 6227:21121fd413fa libavcodec
const
author | michael |
---|---|
date | Fri, 01 Feb 2008 03:51:51 +0000 |
parents | 2b72f9bc4f06 |
children | 48759bfbd073 |
comparison
equal
deleted
inserted
replaced
6226:a955fb25671d | 6227:21121fd413fa |
---|---|
111 } | 111 } |
112 } | 112 } |
113 } | 113 } |
114 | 114 |
115 static int decode_frame(AVCodecContext *avctx, void *data, | 115 static int decode_frame(AVCodecContext *avctx, void *data, |
116 int *data_size, uint8_t * buf, int buf_size) | 116 int *data_size, const uint8_t * buf, int buf_size) |
117 { | 117 { |
118 C93DecoderContext * const c93 = avctx->priv_data; | 118 C93DecoderContext * const c93 = avctx->priv_data; |
119 AVFrame * const newpic = &c93->pictures[c93->currentpic]; | 119 AVFrame * const newpic = &c93->pictures[c93->currentpic]; |
120 AVFrame * const oldpic = &c93->pictures[c93->currentpic^1]; | 120 AVFrame * const oldpic = &c93->pictures[c93->currentpic^1]; |
121 AVFrame *picture = data; | 121 AVFrame *picture = data; |
142 newpic->key_frame = 0; | 142 newpic->key_frame = 0; |
143 } | 143 } |
144 | 144 |
145 if (*buf++ & C93_HAS_PALETTE) { | 145 if (*buf++ & C93_HAS_PALETTE) { |
146 uint32_t *palette = (uint32_t *) newpic->data[1]; | 146 uint32_t *palette = (uint32_t *) newpic->data[1]; |
147 uint8_t *palbuf = buf + buf_size - 768 - 1; | 147 const uint8_t *palbuf = buf + buf_size - 768 - 1; |
148 for (i = 0; i < 256; i++) { | 148 for (i = 0; i < 256; i++) { |
149 palette[i] = bytestream_get_be24(&palbuf); | 149 palette[i] = bytestream_get_be24(&palbuf); |
150 } | 150 } |
151 } else { | 151 } else { |
152 if (oldpic->data[1]) | 152 if (oldpic->data[1]) |