summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-17 23:05:50 +0200
committerwm4 <wm4@nowhere>2014-06-17 23:05:50 +0200
commit90cd5aa8c8950406b335dfb34c01b0fdae833da9 (patch)
tree9f65edaac3b6e0c89b4981e42e0ee02142ab049b /video/out/gl_video.c
parent84eebc6e4eb0a8731ca07e387749fd7167624bfd (diff)
downloadmpv-90cd5aa8c8950406b335dfb34c01b0fdae833da9.tar.bz2
mpv-90cd5aa8c8950406b335dfb34c01b0fdae833da9.tar.xz
vo: make draw_image and vo_queue_image transfer image ownership
Basically a cosmetic change. This is probably more intuitive.
Diffstat (limited to 'video/out/gl_video.c')
-rw-r--r--video/out/gl_video.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index b7a597654e..832f39cfe0 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -1726,8 +1726,8 @@ void gl_video_upload_image(struct gl_video *p, struct mp_image *mpi)
p->osd_pts = mpi->pts;
if (p->hwdec_active) {
- mp_image_setrefp(&vimg->hwimage, mpi);
- p->have_image = !!vimg->hwimage;
+ vimg->hwimage = mpi;
+ p->have_image = true;
return;
}
@@ -1765,6 +1765,7 @@ void gl_video_upload_image(struct gl_video *p, struct mp_image *mpi)
gl->BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
p->have_image = true;
+ talloc_free(mpi);
}
struct mp_image *gl_video_download_image(struct gl_video *p)