Commit 85b7b0c5 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '0ea430c7'

* commit '0ea430c7':
  lclenc: use the AVFrame API properly.

Conflicts:
	libavcodec/lclenc.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 92cbd775 0ea430c7
......@@ -135,6 +135,13 @@ static av_cold int encode_init(AVCodecContext *avctx)
if (!avctx->extradata)
return AVERROR(ENOMEM);
avctx->coded_frame = av_frame_alloc();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
avctx->coded_frame->key_frame = 1;
c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ?
COMP_ZLIB_NORMAL :
av_clip(avctx->compression_level, 0, 9);
......@@ -176,6 +183,8 @@ static av_cold int encode_end(AVCodecContext *avctx)
av_freep(&avctx->extradata);
deflateEnd(&c->zstream);
av_frame_free(&avctx->coded_frame);
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment