From be21e43be585a1595ee4ad41acacc25f3cffaebe Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 23 Sep 2025 20:18:26 +0200 Subject: [PATCH] Fix frame leak on pending frame update The previous pending frame was not unreferenced before referencing the new one, causing frames to leak whenever a texture update failed (typically on Windows when the window is minimized with D3D9). Refs 6298ef095ffa9a2cdd2b4d245e71280743b5a59e Fixes #4297 Fixes #6357 --- app/src/display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/display.c b/app/src/display.c index 200118e6..15f9a1f1 100644 --- a/app/src/display.c +++ b/app/src/display.c @@ -170,6 +170,7 @@ sc_display_set_pending_frame(struct sc_display *display, const AVFrame *frame) { } } + av_frame_unref(display->pending.frame); int r = av_frame_ref(display->pending.frame, frame); if (r) { LOGE("Could not ref frame: %d", r);