mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[fix] fix display errors when stream window resized
This commit is contained in:
@@ -162,11 +162,6 @@ void Render::OnReceiveVideoBufferCb(const XVideoFrame *video_frame,
|
||||
if (!render->dst_buffer_) {
|
||||
render->dst_buffer_capacity_ = video_frame->size;
|
||||
render->dst_buffer_ = new unsigned char[video_frame->size];
|
||||
// Adapt stream_render_rect_ to the video resolution
|
||||
SDL_Event event;
|
||||
event.type = SDL_WINDOWEVENT;
|
||||
event.window.event = SDL_WINDOWEVENT_SIZE_CHANGED;
|
||||
SDL_PushEvent(&event);
|
||||
}
|
||||
|
||||
if (render->dst_buffer_capacity_ < video_frame->size) {
|
||||
@@ -183,7 +178,6 @@ void Render::OnReceiveVideoBufferCb(const XVideoFrame *video_frame,
|
||||
SDL_Event event;
|
||||
event.type = REFRESH_EVENT;
|
||||
SDL_PushEvent(&event);
|
||||
render->received_frame_ = true;
|
||||
render->streaming_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user