comparison lcldec.c @ 9783:21f3bbb20e42 libavcodec

add #if CONFIG_ZLIB_DECODER around zlib_decomp function. Fixes compilation when zlib is not available.
author reimar
date Sun, 31 May 2009 19:51:21 +0000
parents 66922728d7f7
children d7ed9dcc78e3
comparison
equal deleted inserted replaced
9782:66922728d7f7 9783:21f3bbb20e42
122 * \param src compressed input buffer 122 * \param src compressed input buffer
123 * \param src_len data length in input buffer 123 * \param src_len data length in input buffer
124 * \param offset offset in decomp_buf 124 * \param offset offset in decomp_buf
125 * \param expected expected decompressed length 125 * \param expected expected decompressed length
126 */ 126 */
127 #if CONFIG_ZLIB_DECODER
127 static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int src_len, int offset, int expected) 128 static int zlib_decomp(AVCodecContext *avctx, const uint8_t *src, int src_len, int offset, int expected)
128 { 129 {
129 LclDecContext *c = avctx->priv_data; 130 LclDecContext *c = avctx->priv_data;
130 int zret = inflateReset(&c->zstream); 131 int zret = inflateReset(&c->zstream);
131 if (zret != Z_OK) { 132 if (zret != Z_OK) {
146 expected, c->zstream.total_out); 147 expected, c->zstream.total_out);
147 return -1; 148 return -1;
148 } 149 }
149 return c->zstream.total_out; 150 return c->zstream.total_out;
150 } 151 }
152 #endif
151 153
152 154
153 /* 155 /*
154 * 156 *
155 * Decode a frame 157 * Decode a frame