mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
waylandsink: Rollback video info changes when copying
We change the video info base on the received buffer. We need to rollback these changes whenever we want to copy into our internal pool of buffers. https://bugzilla.gnome.org/show_bug.cgi?id=790057
This commit is contained in:
parent
1a7363e023
commit
2db81d6597
1 changed files with 5 additions and 0 deletions
|
@ -631,6 +631,7 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer)
|
|||
GstWlBuffer *wlbuffer;
|
||||
GstVideoMeta *vmeta;
|
||||
GstVideoFormat format;
|
||||
GstVideoInfo old_vinfo;
|
||||
GstMemory *mem;
|
||||
struct wl_buffer *wbuf = NULL;
|
||||
|
||||
|
@ -676,6 +677,7 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer)
|
|||
/* update video info from video meta */
|
||||
mem = gst_buffer_peek_memory (buffer, 0);
|
||||
|
||||
old_vinfo = sink->video_info;
|
||||
vmeta = gst_buffer_get_video_meta (buffer);
|
||||
if (vmeta) {
|
||||
gint i;
|
||||
|
@ -713,6 +715,9 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer)
|
|||
GstVideoFrame src, dst;
|
||||
GstVideoInfo src_info = sink->video_info;
|
||||
|
||||
/* rollback video info changes */
|
||||
sink->video_info = old_vinfo;
|
||||
|
||||
/* we don't know how to create a wl_buffer directly from the provided
|
||||
* memory, so we have to copy the data to shm memory that we know how
|
||||
* to handle... */
|
||||
|
|
Loading…
Reference in a new issue