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

Michael Niedermayer michael at niedermayer.cc
Fri Apr 8 23:56:31 CEST 2016


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

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

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160408/2c9e3d25/attachment.sig>


More information about the ffmpeg-devel mailing list