[FFmpeg-devel] [PATCH 11/13] lclenc: remove unused code

Paul B Mahol onemda at gmail.com
Sat Jul 27 00:26:53 CEST 2013


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavcodec/lclenc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index cbfd8fe..731c2fc 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -56,7 +56,6 @@
 typedef struct LclEncContext {
 
     AVCodecContext *avctx;
-    AVFrame pic;
 
     // Image type
     int imgtype;
@@ -76,7 +75,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
                         const AVFrame *pict, int *got_packet)
 {
     LclEncContext *c = avctx->priv_data;
-    AVFrame * const p = &c->pic;
+    AVFrame * const p = (AVFrame *)pict;
     int i, ret;
     int zret; // Zlib return code
     int max_size = deflateBound(&c->zstream, avctx->width * avctx->height * 3);
@@ -84,7 +83,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     if ((ret = ff_alloc_packet2(avctx, pkt, max_size)) < 0)
         return ret;
 
-    *p = *pict;
     p->pict_type= AV_PICTURE_TYPE_I;
     p->key_frame= 1;
 
@@ -138,7 +136,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
     av_assert0(avctx->width && avctx->height);
 
     avctx->extradata= av_mallocz(8);
-    avctx->coded_frame= &c->pic;
 
     c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ?
                             COMP_ZLIB_NORMAL :
-- 
1.7.11.2



More information about the ffmpeg-devel mailing list