mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
Remove "#if CONFIG_ZLIB" checks from lclenc.c, the file is never compiled
if zlib is not available. Originally committed as revision 19026 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f988ce6cad
commit
7ff7ac60e1
@ -45,9 +45,7 @@
|
|||||||
#include "put_bits.h"
|
#include "put_bits.h"
|
||||||
#include "lcl.h"
|
#include "lcl.h"
|
||||||
|
|
||||||
#if CONFIG_ZLIB
|
|
||||||
#include <zlib.h>
|
#include <zlib.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Decoder context
|
* Decoder context
|
||||||
@ -70,9 +68,7 @@ typedef struct LclEncContext {
|
|||||||
unsigned int max_comp_size;
|
unsigned int max_comp_size;
|
||||||
// Compression buffer
|
// Compression buffer
|
||||||
unsigned char* comp_buf;
|
unsigned char* comp_buf;
|
||||||
#if CONFIG_ZLIB
|
|
||||||
z_stream zstream;
|
z_stream zstream;
|
||||||
#endif
|
|
||||||
} LclEncContext;
|
} LclEncContext;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -87,11 +83,6 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||||||
int i;
|
int i;
|
||||||
int zret; // Zlib return code
|
int zret; // Zlib return code
|
||||||
|
|
||||||
#if !CONFIG_ZLIB
|
|
||||||
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled in.\n");
|
|
||||||
return -1;
|
|
||||||
#else
|
|
||||||
|
|
||||||
init_put_bits(&c->pb, buf, buf_size);
|
init_put_bits(&c->pb, buf, buf_size);
|
||||||
|
|
||||||
*p = *pict;
|
*p = *pict;
|
||||||
@ -131,7 +122,6 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
|
|||||||
flush_put_bits(&c->pb);
|
flush_put_bits(&c->pb);
|
||||||
|
|
||||||
return c->zstream.total_out;
|
return c->zstream.total_out;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -144,11 +134,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
LclEncContext *c = avctx->priv_data;
|
LclEncContext *c = avctx->priv_data;
|
||||||
int zret; // Zlib return code
|
int zret; // Zlib return code
|
||||||
|
|
||||||
#if !CONFIG_ZLIB
|
|
||||||
av_log(avctx, AV_LOG_ERROR, "Zlib support not compiled.\n");
|
|
||||||
return 1;
|
|
||||||
#else
|
|
||||||
|
|
||||||
c->avctx= avctx;
|
c->avctx= avctx;
|
||||||
|
|
||||||
assert(avctx->width && avctx->height);
|
assert(avctx->width && avctx->height);
|
||||||
@ -199,7 +184,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -213,9 +197,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
|
|||||||
|
|
||||||
av_freep(&avctx->extradata);
|
av_freep(&avctx->extradata);
|
||||||
av_freep(&c->comp_buf);
|
av_freep(&c->comp_buf);
|
||||||
#if CONFIG_ZLIB
|
|
||||||
deflateEnd(&(c->zstream));
|
deflateEnd(&(c->zstream));
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user