[fix] Add validity check for props

This commit is contained in:
dijunkun
2025-08-20 16:37:29 +08:00
parent 374453775f
commit 1616d0ec33

View File

@@ -1331,7 +1331,12 @@ void Render::ProcessSdlEvent() {
case STREAM_FRASH: {
auto* props = static_cast<SubStreamWindowProperties*>(event.user.data1);
if (!props) {
LOG_ERROR("Invalid stream window properties");
continue;
}
if (props->video_width_ <= 0 || props->video_height_ <= 0) {
continue;
}
if (!props->dst_buffer_) {
continue;
}