diff options
author | wm4 <wm4@nowhere> | 2014-06-17 23:05:50 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-17 23:05:50 +0200 |
commit | 90cd5aa8c8950406b335dfb34c01b0fdae833da9 (patch) | |
tree | 9f65edaac3b6e0c89b4981e42e0ee02142ab049b /video/out/vo_wayland.c | |
parent | 84eebc6e4eb0a8731ca07e387749fd7167624bfd (diff) | |
download | mpv-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/vo_wayland.c')
-rw-r--r-- | video/out/vo_wayland.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/video/out/vo_wayland.c b/video/out/vo_wayland.c index f41c75f114..be51ec55de 100644 --- a/video/out/vo_wayland.c +++ b/video/out/vo_wayland.c @@ -658,6 +658,7 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) if (!buf) { MP_VERBOSE(p->wl, "can't draw, back buffer is busy\n"); + talloc_free(mpi); return; } @@ -678,7 +679,10 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) struct mp_image img = buffer_get_mp_image(p, &p->video_bufpool, buf); mp_sws_scale(p->sws, &img, &src); - mp_image_setrefp(&p->original_image, mpi); + if (mpi != p->original_image) { + talloc_free(p->original_image); + p->original_image = mpi; + } buffer_finalise_back(buf); draw_osd(vo); |