If a drawable contains a valid dmabuf fd, then it makes sense to create a stream for it right away. Cc: Gerd Hoffmann <kraxel@xxxxxxxxxx> Cc: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> Cc: Dongwon Kim <dongwon.kim@xxxxxxxxx> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@xxxxxxxxx> --- server/video-stream.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/video-stream.cpp b/server/video-stream.cpp index 28b42d91..8b957373 100644 --- a/server/video-stream.cpp +++ b/server/video-stream.cpp @@ -218,6 +218,9 @@ static bool is_next_stream_frame(const Drawable *candidate, if (!candidate->streamable) { return FALSE; } + if (candidate->dmabuf_fd > 0) { + return TRUE; + } if (candidate->creation_time - other_time > (stream ? RED_STREAM_CONTINUOUS_MAX_DELTA : RED_STREAM_DETECTION_MAX_DELTA)) { @@ -448,7 +451,7 @@ static bool video_stream_add_frame(DisplayChannel *display, frame_drawable->last_gradual_frame = last_gradual_frame; } - if (is_stream_start(frame_drawable)) { + if (is_stream_start(frame_drawable) || frame_drawable->dmabuf_fd > 0) { display_channel_create_stream(display, frame_drawable); return TRUE; } -- 2.37.2