changeset 3283:c53ef1f63575 libavcodec

memory leak.
author lorenm
date Fri, 28 Apr 2006 23:16:42 +0000
parents ecc93139021c
children a224d9752912
files ffv1.c
diffstat 1 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/ffv1.c	Fri Apr 28 17:29:07 2006 +0000
+++ b/ffv1.c	Fri Apr 28 23:16:42 2006 +0000
@@ -688,7 +688,8 @@
     }
 }
 
-static void common_end(FFV1Context *s){
+static int common_end(AVCodecContext *avctx){
+    FFV1Context *s = avctx->priv_data;
     int i;
 
     for(i=0; i<s->plane_count; i++){
@@ -696,13 +697,6 @@
 
         av_freep(&p->state);
     }
-}
-
-static int encode_end(AVCodecContext *avctx)
-{
-    FFV1Context *s = avctx->priv_data;
-
-    common_end(s);
 
     return 0;
 }
@@ -1018,7 +1012,7 @@
     sizeof(FFV1Context),
     decode_init,
     NULL,
-    NULL,
+    common_end,
     decode_frame,
     CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/,
     NULL
@@ -1032,6 +1026,6 @@
     sizeof(FFV1Context),
     encode_init,
     encode_frame,
-    encode_end,
+    common_end,
 };
 #endif