mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
waylandsink: do not use drm dumb pool when importing DMAbuf buffers
There is no need to use DRM dumb pool if buffer to render is already a DMABuf, just import it and render it. This fixes a DMAbuf memory leakage when waylandsink downstream element exports DMABuf while waylandsink is configured to be DMABuf exporter (drm-device=/drv/dri/card0): gst-launch-1.0 v4l2src io-mode=4 ! waylandsink drm-device=/dev/dri/card0 leakage identfied with command: watch "cat /sys/kernel/debug/dma_buf/bufinfo | grep attached " Fixes #2729 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5350>
This commit is contained in:
parent
39aca8a096
commit
e4bc88492a
1 changed files with 6 additions and 6 deletions
|
@ -924,12 +924,12 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer)
|
||||||
wbuf = gst_wl_linux_dmabuf_construct_wl_buffer (buffer, self->display,
|
wbuf = gst_wl_linux_dmabuf_construct_wl_buffer (buffer, self->display,
|
||||||
&self->drm_info);
|
&self->drm_info);
|
||||||
|
|
||||||
/* DMABuf did not work, let try and make this a dmabuf, it does not matter
|
if (!wbuf && !self->skip_dumb_buffer_copy) {
|
||||||
* if it was a SHM since the compositor needs to copy that anyway, and
|
/* DMABuf did not work, let try and make this a dmabuf, it does not matter
|
||||||
* offloading the compositor from a copy helps maintaining a smoother
|
* if it was a SHM since the compositor needs to copy that anyway, and
|
||||||
* desktop.
|
* offloading the compositor from a copy helps maintaining a smoother
|
||||||
*/
|
* desktop.
|
||||||
if (!self->skip_dumb_buffer_copy) {
|
*/
|
||||||
GstVideoFrame src, dst;
|
GstVideoFrame src, dst;
|
||||||
|
|
||||||
if (!gst_wayland_activate_drm_dumb_pool (self)) {
|
if (!gst_wayland_activate_drm_dumb_pool (self)) {
|
||||||
|
|
Loading…
Reference in a new issue