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_sdl.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_sdl.c')
-rw-r--r-- | video/out/vo_sdl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c index 21b99dcf81..40d70950f3 100644 --- a/video/out/vo_sdl.c +++ b/video/out/vo_sdl.c @@ -853,6 +853,7 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) vc->osd_pts = mpi->pts; if (SDL_LockTexture(vc->tex, NULL, &pixels, &pitch)) { MP_ERR(vo, "SDL_LockTexture failed\n"); + talloc_free(mpi); return; } @@ -880,7 +881,8 @@ static void draw_image(struct vo *vo, mp_image_t *mpi) SDL_UnlockTexture(vc->tex); - mp_image_setrefp(&vc->ssmpi, mpi); + talloc_free(vc->ssmpi); + vc->ssmpi = mpi; } SDL_Rect src, dst; |