Commit ca0e7775 authored by Gwenole Beauchesne's avatar Gwenole Beauchesne

vaapisink: fix memory leak of GstSample objects.

Fix memory leak of GstSample objects in GstVideoOverlayInterface::expose().
This also fixes extra unreferencing of the underlying GstBuffer in the common
path afterwards (for both 0.10 or 1.0).
parent 9b981dd2
......@@ -225,7 +225,8 @@ gst_vaapisink_video_overlay_expose(GstVideoOverlay *overlay)
GstSample * const sample = gst_base_sink_get_last_sample(base_sink);
if (!sample)
return;
buffer = gst_sample_get_buffer(sample);
buffer = gst_buffer_ref(gst_sample_get_buffer(sample));
gst_sample_unref(sample);
#else
buffer = gst_base_sink_get_last_buffer(base_sink);
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment