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).
This commit is contained in:
Gwenole Beauchesne 2013-04-12 17:05:06 +02:00
parent 9b981dd244
commit ca0e77756b

View file

@ -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