mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
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:
parent
9b981dd244
commit
ca0e77756b
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue