mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 14:41:25 +00:00
gstreamer-encoder: Add video metadata for DMA-BUF
Include video metadata when using DMA-BUF to provide stride and offset. Without this metadata, GStreamer may incorrectly interpret the buffer layout, leading to corrupted image output—especially when the framebuffer includes padding.
This commit is contained in:
parent
052f9f2146
commit
be8aeaafd2
@ -1805,6 +1805,15 @@ spice_gst_encoder_encode_dmabuf(VideoEncoder *video_encoder,
|
||||
}
|
||||
gst_buffer_append_memory(buffer, mem);
|
||||
}
|
||||
|
||||
gst_buffer_add_video_meta_full(buffer,
|
||||
GST_VIDEO_FRAME_FLAG_NONE,
|
||||
encoder->format->gst_format,
|
||||
dmabuf_data->width,
|
||||
dmabuf_data->height,
|
||||
dmabuf_data->num_planes,
|
||||
dmabuf_data->offset,
|
||||
dmabuf_data->stride);
|
||||
|
||||
gst_mini_object_weak_ref(GST_MINI_OBJECT(buffer),
|
||||
(GstMiniObjectNotify)spice_gst_mem_free_cb,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user