[FFmpeg-devel] [PATCH] fix tests/seek_test memleaks
Reimar Döffinger
Reimar.Doeffinger
Sun Feb 28 12:21:06 CET 2010
On Sat, Feb 27, 2010 at 03:55:42PM +0100, Vitor Sessak wrote:
> Reimar D?ffinger wrote:
> >Hello,
> >seems there's a incorrect av_dup_packet in utils.c?
> >At least I am unable to see why it is there, and I sure can't see a corresponding
> >free...
> >Also is the documentation on av_open_input_file clear enough that you shouldn't
> >alloc the context first?
>
> >
> >Index: libavformat/utils.c
> >===================================================================
> >--- libavformat/utils.c (revision 22083)
> >+++ libavformat/utils.c (working copy)
> >@@ -2169,10 +2169,6 @@
> > }
> > pkt= add_to_pktbuf(&ic->packet_buffer, &pkt1, &ic->packet_buffer_end);
> >- if(av_dup_packet(pkt) < 0) {
> >- av_free(duration_error);
> >- return AVERROR(ENOMEM);
> >- }
>
> This hunk seems to break "make test":
Yes, I completely misunderstood the code.
I applied correct fixes, seek_test should no longer leak memory.
More information about the ffmpeg-devel
mailing list