From e978511d63ec35182e4e11825836552b7a8e7159 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 11 Aug 2013 20:09:06 +0200 Subject: 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. --- video/out/vo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/vo.c b/video/out/vo.c index 32803a0a23..5a1b6f6fcd 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -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); } -- cgit v1.2.3