GNOME Bugzilla – Bug 797326
matroska-demux leaks caps
Last modified: 2018-10-27 09:50:14 UTC
Created attachment 374012 [details] [review] patch The demuxer leaks caps in the new gst_matroska_demux_update_tracks function
Review of attachment 374012 [details] [review]: ::: gst/matroska/matroska-demux.c @@ +3279,3 @@ gst_pad_set_caps (new_track->pad, new_track->caps); } + gst_caps_replace (&old_track->caps, NULL); The gst_matroska_track_free(old_track) a few lines below should unref the caps already, but it doesn't... can you move this code there, and also check if other things would have to be freed there too?
Created attachment 374025 [details] [review] patch2 Moved gst_caps_replace to gst_matroska_track_free as you suggested, works fine in my usecase and passes gst-plugins-good unittest with valgrind aswell. Have not had time to check if there might be other values not getting properly released, might take a look at it after the GStreamer conference.
Comment on attachment 374025 [details] [review] patch2 Great, let's wait until someone had the time to check for other things to be freed then unless it takes too long :)
commit e736f29376ad3021ec719621f49c68a15bc30b47 (HEAD -> master) Author: Johan Bjäreholt <johanbj@axis.com> Date: Wed Oct 17 12:58:08 2018 +0200 matroska-demux: Fix caps memleak https://bugzilla.gnome.org/show_bug.cgi?id=797326
Looked like everything else is handled. thanks!