GNOME Bugzilla – Bug 752041
ximagesink: fix navigation event leak
Last modified: 2015-08-16 13:38:17 UTC
Create event only when pad is created and send the event to pad.
Created attachment 306965 [details] [review] fix event leak
Do you mind explaining a bit further what this fixes and why is it better?
It is basically a leak fix of event variable.. Event is being created in the beginning and when there is no xwindow, it just returns without being freed.. There is no need to create event in the beginning, so moving the same down, when it is needed.. thus it won't leak when it returns for no xwindow.. And the whole functionality is needed input when pad is present. Hence adding the whole functionality inside the if condition. The change is actually similar to the code already present in xvimagesink
Review of attachment 306965 [details] [review]: ::: sys/ximage/ximagesink.c @@ +1565,3 @@ + event = gst_event_new_navigation (structure); + if (GST_IS_EVENT (event)) + gst_pad_send_event (pad, event); Why check if it's a valid event? It must be :) Also why is this not just using gst_pad_push_event() on the sinkpad of xvimagesink, then it wouldn't matter if there was a peer or not.
Created attachment 306992 [details] [review] fix event leak send_event code was there from long time. So did not change that. :) Now removed the code related to peer pad and using push_event instead of send event..
Review of attachment 306992 [details] [review]: commit db86c73f4d8a876b63acdeaf205b26baffc9aeca Author: Vineeth T M <vineeth.tm@samsung.com> Date: Tue Jul 7 19:35:40 2015 +0900 ximagesink: fix navigation event leak Create event only when pad is created and send the event to pad. https://bugzilla.gnome.org/show_bug.cgi?id=752041