1
0
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:
wm4 2013-08-11 20:09:06 +02:00
parent abe47a4840
commit e978511d63

View File

@ -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);
}