GNOME Bugzilla – Bug 657049
textoverlay: buffer leaks
Last modified: 2011-08-23 07:52:21 UTC
I checked this potential bug is not only in 0.10.32, but also 0.10.34 and 0.11.0. Hi Developers, I found one potential bug in gst_text_overlay_text_chain() in ext/pango/gsttextoverlay.c (as the mail title). If looked at this piece of code, ... if (G_LIKELY (GST_BUFFER_TIMESTAMP_IS_VALID (buffer))) { ... in_seg = gst_segment_clip (&overlay->text_segment, GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (buffer), stop, &clip_start, &clip_stop); } else { in_seg = TRUE; } if (in_seg) { ... } GST_OBJECT_UNLOCK (overlay); // NOTE the buffer will not be unref in case of in_seg == FALSE beach: return ret; } If the in_seg == TRUE, the text buffer will render the text and push into the queue. But if in_seg = FALSE, the text buffer will not be unrefed. So I think this is the bug and should add code to handle unref the buffer in case of in_seg == FALSE. Or it will have memory leakage. Let me know if I am wrong.
Good catch, a few other paths were also leaking the buffer.
Created attachment 194347 [details] [review] textoverlay: fix text buffer leak Reported by bcxa.sz@gmail.com.
Thanks: commit 7d3858a14da8e3b9ec6a36e9c2e5c627e77b9df6 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Mon Aug 22 09:06:53 2011 +0100 textoverlay: fix text buffer leak Make sure to always unref the input text buffer. Reported by bcxa.sz@gmail.com. https://bugzilla.gnome.org/show_bug.cgi?id=657049
Thanks for the quick fix. Please let me know which official release package will have this fix. 0.11.0?
> which official release package will have this fix. 0.11.0? 0.10.36