summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video.c
diff options
context:
space:
mode:
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)