mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[fix] fix render area cannot fit the resolution of the receiving video stream
This commit is contained in:
@@ -123,6 +123,11 @@ 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) {
|
||||
|
||||
Reference in New Issue
Block a user