mirror of
https://github.com/mpv-player/mpv
synced 2025-03-10 08:13:03 +00:00
vo: unref waiting image before destroying VO driver
This is in theory more correct with respect to hardware decoding. With hardware decoding, the VOs play the role of the video surface allocator, and nothing is allowed to reference surfaces past the VO lifetime. But in theory waiting_mpi could be a reference to a HW video surface, so it should be relased before the VO is uninitialized.
This commit is contained in:
parent
abe47a4840
commit
e978511d63
@ -289,8 +289,8 @@ void vo_destroy(struct vo *vo)
|
||||
{
|
||||
if (vo->registered_fd != -1)
|
||||
mp_input_rm_key_fd(vo->input_ctx, vo->registered_fd);
|
||||
mp_image_unrefp(&vo->waiting_mpi);
|
||||
vo->driver->uninit(vo);
|
||||
talloc_free(vo->waiting_mpi);
|
||||
talloc_free(vo);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user