summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-08-11 20:09:06 +0200
committerwm4 <wm4@nowhere>2013-08-11 20:09:06 +0200
commite978511d63ec35182e4e11825836552b7a8e7159 (patch)
tree19f2d47cd5c2ccd3f8eeb4275091abbefc423cca /video
parentabe47a4840fda23aa3f54e45bb9d5c5df1f7909c (diff)
downloadmpv-e978511d63ec35182e4e11825836552b7a8e7159.tar.bz2
mpv-e978511d63ec35182e4e11825836552b7a8e7159.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo.c2
1 files changed, 1 insertions, 1 deletions
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);
}