mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-10-04 07:08:43 +00:00
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 6298ef095f
Fixes #4297 <https://github.com/Genymobile/scrcpy/issues/4297>
Fixes #6357 <https://github.com/Genymobile/scrcpy/issues/6357>
This commit is contained in:
parent
bfb0872493
commit
be21e43be5
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue