1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

lclenc: remove unused code

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2013-07-26 21:45:10 +00:00
parent fe37551249
commit 69fe25cdca

View File

@ -56,7 +56,6 @@
typedef struct LclEncContext { typedef struct LclEncContext {
AVCodecContext *avctx; AVCodecContext *avctx;
AVFrame pic;
// Image type // Image type
int imgtype; int imgtype;
@ -73,10 +72,9 @@ typedef struct LclEncContext {
* *
*/ */
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *pict, int *got_packet) const AVFrame *p, int *got_packet)
{ {
LclEncContext *c = avctx->priv_data; LclEncContext *c = avctx->priv_data;
AVFrame * const p = &c->pic;
int i, ret; int i, ret;
int zret; // Zlib return code int zret; // Zlib return code
int max_size = deflateBound(&c->zstream, avctx->width * avctx->height * 3); int max_size = deflateBound(&c->zstream, avctx->width * avctx->height * 3);
@ -84,10 +82,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
if ((ret = ff_alloc_packet2(avctx, pkt, max_size)) < 0) if ((ret = ff_alloc_packet2(avctx, pkt, max_size)) < 0)
return ret; return ret;
*p = *pict;
p->pict_type= AV_PICTURE_TYPE_I;
p->key_frame= 1;
if(avctx->pix_fmt != AV_PIX_FMT_BGR24){ if(avctx->pix_fmt != AV_PIX_FMT_BGR24){
av_log(avctx, AV_LOG_ERROR, "Format not supported!\n"); av_log(avctx, AV_LOG_ERROR, "Format not supported!\n");
return -1; return -1;
@ -140,7 +134,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
avctx->extradata = av_mallocz(8 + FF_INPUT_BUFFER_PADDING_SIZE); avctx->extradata = av_mallocz(8 + FF_INPUT_BUFFER_PADDING_SIZE);
if (!avctx->extradata) if (!avctx->extradata)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
avctx->coded_frame= &c->pic;
c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ? c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ?
COMP_ZLIB_NORMAL : COMP_ZLIB_NORMAL :