mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-22 10:23:47 +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);
|
GstVaapiSink *const sink = GST_VAAPISINK (navigation);
|
||||||
GstPad *peer;
|
GstPad *peer;
|
||||||
|
|
||||||
|
if (!sink->window) {
|
||||||
|
gst_structure_free (structure);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((peer = gst_pad_get_peer (GST_VAAPI_PLUGIN_BASE_SINK_PAD (sink)))) {
|
if ((peer = gst_pad_get_peer (GST_VAAPI_PLUGIN_BASE_SINK_PAD (sink)))) {
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
GstVaapiRectangle *disp_rect = &sink->display_rect;
|
GstVaapiRectangle *disp_rect = &sink->display_rect;
|
||||||
|
@ -843,9 +848,6 @@ gst_vaapisink_navigation_send_event (GstNavigation * navigation,
|
||||||
|
|
||||||
event = gst_event_new_navigation (structure);
|
event = gst_event_new_navigation (structure);
|
||||||
|
|
||||||
if (!sink->window)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* We calculate scaling using the original video frames geometry to include
|
/* We calculate scaling using the original video frames geometry to include
|
||||||
pixel aspect ratio scaling. */
|
pixel aspect ratio scaling. */
|
||||||
xscale = (gdouble) sink->video_width / disp_rect->width;
|
xscale = (gdouble) sink->video_width / disp_rect->width;
|
||||||
|
|
Loading…
Reference in a new issue