mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 10:41:04 +00:00
vaapisink: Fix event,pad,structure memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=762229
This commit is contained in:
parent
ce1ab4673c
commit
24bc53456c
1 changed files with 5 additions and 3 deletions
|
@ -836,6 +836,11 @@ gst_vaapisink_navigation_send_event (GstNavigation * navigation,
|
|||
GstVaapiSink *const sink = GST_VAAPISINK (navigation);
|
||||
GstPad *peer;
|
||||
|
||||
if (!sink->window) {
|
||||
gst_structure_free (structure);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((peer = gst_pad_get_peer (GST_VAAPI_PLUGIN_BASE_SINK_PAD (sink)))) {
|
||||
GstEvent *event;
|
||||
GstVaapiRectangle *disp_rect = &sink->display_rect;
|
||||
|
@ -843,9 +848,6 @@ gst_vaapisink_navigation_send_event (GstNavigation * navigation,
|
|||
|
||||
event = gst_event_new_navigation (structure);
|
||||
|
||||
if (!sink->window)
|
||||
return;
|
||||
|
||||
/* We calculate scaling using the original video frames geometry to include
|
||||
pixel aspect ratio scaling. */
|
||||
xscale = (gdouble) sink->video_width / disp_rect->width;
|
||||
|
|
Loading…
Reference in a new issue