[FFmpeg-devel] [PATCH] hevc: Fix memory leak related to a53_caption data

Will Kelleher wkelleher at gogoair.com
Sat Apr 9 00:04:17 CEST 2016


On 04/08, Michael Niedermayer wrote:
> On Fri, Apr 08, 2016 at 04:17:56PM -0500, Will Kelleher wrote:
> > On 04/08, Michael Niedermayer wrote:
> > > 
> > > > The a53_caption buffer is normally realloc'd when each sei_nal is
> > > > parsed, and then freed after it gets written to the output frame's
> > > > side data in hevc_frame_start.
> > > 
> > > and if an error happens between it leaks ?
> > > 
> > 
> > If an error occurred after sei nal parsing but before the data was
> > written to the output frame's side_data, it would just stay on the
> > context and get appended to when the following frame's sei nals get
> > parsed, and then the combined caption data of two frames would be
> > attached to the second output frame, I think.
> 
> consider that this might have been the last frame and theres no next

The leak is...continuous.  We only noticed it during long running decode
operations because the amount is small, but it definitely adds up.

> 
> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Asymptotically faster algorithms should always be preferred if you have
> asymptotical amounts of data



> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fffmpeg.org%2fmailman%2flistinfo%2fffmpeg-devel&data=01%7c01%7cwkelleher%40gogoair.com%7c201d2489d79b4ea6838c08d35ff8e113%7c2e6508518649457ea18abc0264c3b7d0%7c1&sdata=VkOooHUc6od6QXEY1MVqjikRoQrpDIGJZzLLjbfFu9s%3d



More information about the ffmpeg-devel mailing list