GNOME Bugzilla – Bug 689814
Memory allocated by GstVideoDecoder base class is not freed
Last modified: 2012-12-10 11:54:05 UTC
In gstvideodecoder.c: A call is made to gst_video_decoder_add_timestamp which allocates a 32 byte structure and a linked list element. gst_video_decoder_get_timestamp_at_offset would free this memory, but it is not called in my test cases. This would happen in gst_video_decoder_have_frame, but it is not called. I'm using the MPEG2 Video Decoder ("avdec_mpeg2video"). I'm pretty sure this applies to other video decoders. It seems small, but, with overhead, it amounts to several MB/hr.
The timestamps are freed in _reset() and _get_timestamp_at_offset() (which is called from _have_frame()). So it shouldn't be leaked forever at least. _have_frame() should be called by the subclass whenever it parsed a frame. But as the gst-libav video decoders don't parse anything this never happens. The baseclass shouldn't store the timestamps at all if the subclass doesn't want to parse anything. Will fix that
commit 0bb5c6c012571d9ce7f80d9699a0d63f2768c271 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Mon Dec 10 11:49:46 2012 +0000 videodecoder: Only keep track of timestamps if the subclass is parsing data Otherwise we just pass through the timestamps directly and don't need to waste additional memory for them. Fixes bug #689814.