Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/platform/linux/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,15 @@ namespace platf {
* @return Always `true` because Linux GPU changes are not tracked by this backend.
*/
bool needs_encoder_reenumeration() {
// We don't track GPU state, so we will always reenumerate. Fortunately, it is fast on Linux.
// Only re-probe if the GPU render device changed (hotplug, driver reload).
// Full re-probing on every reconnect leaks ~20 MB due to FFmpeg CBS
// allocations during HEVC/AV1 codec validation.
static std::string last_render_device;
auto current = platf::resolve_render_device();
if (current == last_render_device) {
return false;
}
last_render_device = current;
return true;
}

Expand Down
Loading