[FFmpeg-devel] Fix leak when user preallocates a AVFormatContext, passes it to av_open_input_file, but file does not exist on disk

Art Clarke aclarke
Wed Jul 8 06:07:18 CEST 2009


On Tue, Jul 7, 2009 at 6:30 PM, Michael Niedermayer <michaelni at gmx.at>wrote:

> >
> > av_freep(ic_ptr);
>
> with that change iam ok with the patch ...
>
>
Attached.

- Art

-- 
http://www.xuggle.com/
xu?ggle (z?' gl) v. To freely encode, decode, and experience audio and
video.

Use Xuggle to get the power of FFmpeg in Java.
-------------- next part --------------
Index: libavformat/utils.c
===================================================================
--- libavformat/utils.c	(revision 19367)
+++ libavformat/utils.c	(working copy)
@@ -499,7 +499,7 @@
     av_freep(&pd->buf);
     if (pb)
         url_fclose(pb);
-    *ic_ptr = NULL;
+    av_freep(ic_ptr);
     return err;
 
 }



More information about the ffmpeg-devel mailing list