GNOME Bugzilla – Bug 736788
audiodecoder: leaks events
Last modified: 2014-09-19 06:51:04 UTC
Created attachment 286352 [details] [review] Unit test which triggers the leaks audiodecoder leaks memory
Created attachment 286353 [details] [review] fix leaks
Created attachment 286357 [details] [review] pad: add annotation to gst_pad_store_sticky_event()
Comment on attachment 286357 [details] [review] pad: add annotation to gst_pad_store_sticky_event() The annotation is not necessary, transfer none is the default
commit 5a3ebef605f52864d01b7f02bb95556ab0b53188 Author: Ognyan Tonchev <ognyan@axis.com> Date: Wed Sep 17 12:17:27 2014 +0200 audiodecoder: extend flush_events test to check for event leaks https://bugzilla.gnome.org/show_bug.cgi?id=736788 commit c674a0aa649b3c47fd46bdf85487f8520250c0a3 Author: Ognyan Tonchev <ognyan@axis.com> Date: Wed Sep 17 12:17:53 2014 +0200 audiodecoder: Don't leak events https://bugzilla.gnome.org/show_bug.cgi?id=736788
A quick grep for GST_EVENT_CAST showed that this code is you could also check gstvideodecoder.c, gstvideoencoder.c, gstaudioencoder.c and gststreamsplitter.c which seem to suffer from the same problem. Also the code for "_flush_events()" in all these functions seems to be duplicated.
And one more comment: If "gst_event_unref (tmp->data);" is the right fix in both cases why not just putting it right before "g_list_free (events);"?
You are right, will change it that way.