[FFmpeg-devel] [PATCH] fix imlib2 memory leaks

Michael Niedermayer michaelni
Mon Jun 18 13:15:53 CEST 2007


Hi

On Mon, Jun 18, 2007 at 10:22:42AM +0800, Limin Wang wrote:
> Hi,
> 
> $subj, please review attached patch.
> 
> 
> Thanks,
> Limin

> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c	(revision 9358)
> +++ ffmpeg.c	(working copy)
> @@ -3858,6 +3858,7 @@
>      av_free(opt_names);
>  
>      av_free(video_standard);
> +    frame_hook_release();
>  
>  #ifdef CONFIG_POWERPC_PERF
>      extern void powerpc_display_perf_report(void);

this belongs in a seperate patch and iam not reviewing vhook related patches
iam just reviewing patches to existing vhook filters as the code might get
ported to the new filter system



> Index: vhook/imlib2.c
> ===================================================================
> --- vhook/imlib2.c	(revision 9358)
> +++ vhook/imlib2.c	(working copy)
> @@ -174,11 +174,17 @@
>              imlib_context_set_image(ci->imageOverlaid);
>              imlib_free_image();
>          }
> -        ff_eval_free(ci->expr_x);
> -        ff_eval_free(ci->expr_y);
> -        ff_eval_free(ci->expr_R);
> -        ff_eval_free(ci->expr_G);
> -        ff_eval_free(ci->expr_B);
> +        ff_eval_free(ci->eval_x);
> +        ff_eval_free(ci->eval_y);
> +        ff_eval_free(ci->eval_r);
> +        ff_eval_free(ci->eval_g);
> +        ff_eval_free(ci->eval_b);
> +
> +        av_free(ci->expr_x);
> +        av_free(ci->expr_y);
> +        av_free(ci->expr_R);
> +        av_free(ci->expr_G);
> +        av_free(ci->expr_B);
>          sws_freeContext(ci->toRGB_convert_ctx);
>          sws_freeContext(ci->fromRGB_convert_ctx);
>          av_free(ctx);

this looks ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070618/2badc305/attachment.pgp>



More information about the ffmpeg-devel mailing list