[FFmpeg-cvslog] Merge commit '0ea430c75b8d90449d2878ad84669a2da2ad3cbc'

Michael Niedermayer git at videolan.org
Tue Jan 7 03:47:26 CET 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 17 11:41:26 2013 +0100| [9ebe344166e0050d21a548aa917dfe00c1d3d4b2] | committer: Michael Niedermayer

Merge commit '0ea430c75b8d90449d2878ad84669a2da2ad3cbc'

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

Conflicts:
	libavcodec/lclenc.c

Merged-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 85b7b0c519f8d9491b4c0340329a605cc97c8984)

Author of the merged code: Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9ebe344166e0050d21a548aa917dfe00c1d3d4b2
---

 libavcodec/lclenc.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index 1dac307..0afe553 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -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;
 }
 



More information about the ffmpeg-cvslog mailing list