Browse Source

Merge commit '0ea430c75b8d90449d2878ad84669a2da2ad3cbc'

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

Conflicts:
	libavcodec/lclenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
85b7b0c519
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      libavcodec/lclenc.c

+ 9
- 0
libavcodec/lclenc.c View File

@@ -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;
}



Loading…
Cancel
Save