[FFmpeg-devel] [PATCH] Fix leaking of side data.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Jan 14 17:40:57 CET 2012


On Sat, Jan 14, 2012 at 12:28:34AM +0100, Michael Niedermayer wrote:
> On Fri, Jan 13, 2012 at 07:53:14PM +0100, Reimar Döffinger wrote:
> > While we correctly "register" the side data when we split it,
> > the application (in this case FFmpeg) might not update the
> > AVPacket pool it uses to finally free the packet, thus
> > causing a leak.
> > This also makes the av_dup_packet unnecessary which could
> > cause an even worse leak in this situation.
> > Also change the code to not modify the user-provide AVPacket at all.
> > 
> > Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> 
> not pretty but ok

Suggestions for improvements are welcome.
I guess I might have renamed the argument and added a local
avpkt pointer to keep the code as similar as possible,
but I am not sure that's really better?


More information about the ffmpeg-devel mailing list