Re: [FFmpeg-devel] [PATCH] avfilter/palettegen/RFC: fix mem leak

2015-02-27 Thread Clément Bœsch
On Fri, Feb 27, 2015 at 12:50:23PM +0100, Nicolas George wrote:
 Le nonidi 9 ventôse, an CCXXIII, Clement Boesch a écrit :
  I don't understand why I need to do that. The free is already present in
  the uninit, and before every update of the prev_frame update.
 
 In uninit, I see:
 
 av_freep(s-prev_frame);
 
 I suspect it should be av_frame_free() instead.
 

...

I feel really dumb. Thank you. Fix pushed.

 Regards,
 

-- 
Clément B.


pgpQlgZYwi0Sx.pgp
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avfilter/palettegen/RFC: fix mem leak

2015-02-27 Thread Nicolas George
Le nonidi 9 ventôse, an CCXXIII, Clement Boesch a écrit :
 I don't understand why I need to do that. The free is already present in
 the uninit, and before every update of the prev_frame update.

In uninit, I see:

av_freep(s-prev_frame);

I suspect it should be av_frame_free() instead.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avfilter/palettegen/RFC: fix mem leak

2015-02-26 Thread Clément Bœsch
I don't understand why I need to do that. The free is already present in
the uninit, and before every update of the prev_frame update.
---
 libavfilter/vf_palettegen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c
index fa8cc12a..bb22196 100644
--- a/libavfilter/vf_palettegen.c
+++ b/libavfilter/vf_palettegen.c
@@ -507,6 +507,7 @@ static int request_frame(AVFilterLink *outlink)
 if (r == AVERROR_EOF  !s-palette_pushed) {
 r = ff_filter_frame(outlink, get_palette_frame(ctx));
 s-palette_pushed = 1;
+av_frame_free(s-prev_frame);
 return r;
 }
 return r;
-- 
2.3.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel