comparison cscd.c @ 8732:967c0a1a60a0 libavcodec

Add av_ prefix to LZO stuff and thus make it officially part of the public API. Keep lzo1x_decode until the next major version bump for binary compatibility.
author reimar
date Mon, 02 Feb 2009 20:16:00 +0000
parents 7a463923ecd1
children 54bc8a2727b0
comparison
equal deleted inserted replaced
8731:6a1ef00ca991 8732:967c0a1a60a0
156 156
157 // decompress data 157 // decompress data
158 switch ((buf[0] >> 1) & 7) { 158 switch ((buf[0] >> 1) & 7) {
159 case 0: { // lzo compression 159 case 0: { // lzo compression
160 int outlen = c->decomp_size, inlen = buf_size - 2; 160 int outlen = c->decomp_size, inlen = buf_size - 2;
161 if (lzo1x_decode(c->decomp_buf, &outlen, &buf[2], &inlen)) 161 if (av_lzo1x_decode(c->decomp_buf, &outlen, &buf[2], &inlen))
162 av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n"); 162 av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n");
163 break; 163 break;
164 } 164 }
165 case 1: { // zlib compression 165 case 1: { // zlib compression
166 #if CONFIG_ZLIB 166 #if CONFIG_ZLIB
230 c->bpp = avctx->bits_per_coded_sample; 230 c->bpp = avctx->bits_per_coded_sample;
231 c->pic.data[0] = NULL; 231 c->pic.data[0] = NULL;
232 c->linelen = avctx->width * avctx->bits_per_coded_sample / 8; 232 c->linelen = avctx->width * avctx->bits_per_coded_sample / 8;
233 c->height = avctx->height; 233 c->height = avctx->height;
234 c->decomp_size = c->height * c->linelen; 234 c->decomp_size = c->height * c->linelen;
235 c->decomp_buf = av_malloc(c->decomp_size + LZO_OUTPUT_PADDING); 235 c->decomp_buf = av_malloc(c->decomp_size + AV_LZO_OUTPUT_PADDING);
236 if (!c->decomp_buf) { 236 if (!c->decomp_buf) {
237 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n"); 237 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
238 return 1; 238 return 1;
239 } 239 }
240 return 0; 240 return 0;