After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752041 - ximagesink: fix navigation event leak
ximagesink: fix navigation event leak
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Linux
: Normal normal
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 752043
 
 
Reported: 2015-07-07 00:25 UTC by Vineeth
Modified: 2015-08-16 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix event leak (3.29 KB, patch)
2015-07-07 00:28 UTC, Vineeth
none Details | Review
fix event leak (1.56 KB, patch)
2015-07-07 10:38 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-07-07 00:25:49 UTC
Create event only when pad is created
and send the event to pad.
Comment 1 Vineeth 2015-07-07 00:28:11 UTC
Created attachment 306965 [details] [review]
fix event leak
Comment 2 Luis de Bethencourt 2015-07-07 09:57:33 UTC
Do you mind explaining a bit further what this fixes and why is it better?
Comment 3 Vineeth 2015-07-07 10:07:06 UTC
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
Comment 4 Sebastian Dröge (slomo) 2015-07-07 10:08:59 UTC
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.
Comment 5 Vineeth 2015-07-07 10:38:01 UTC
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..
Comment 6 Luis de Bethencourt 2015-07-07 10:57:11 UTC
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