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.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.c')
-rw-r--r-- | video/out/vo.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index 1af050f050..b41f281aad 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -287,7 +287,6 @@ void vo_queue_image(struct vo *vo, struct mp_image *mpi) if (!vo->config_ok) return; assert(mp_image_params_equals(vo->params, &mpi->params)); - mpi = mp_image_new_ref(mpi); if (vo->driver->filter_image && mpi) mpi = vo->driver->filter_image(vo, mpi); if (!mpi) { @@ -333,7 +332,6 @@ static void shift_queue(struct vo *vo) { if (!vo->num_video_queue) return; - talloc_free(vo->video_queue[0]); vo->num_video_queue--; for (int n = 0; n < vo->num_video_queue; n++) vo->video_queue[n] = vo->video_queue[n + 1]; @@ -342,8 +340,9 @@ static void shift_queue(struct vo *vo) void vo_new_frame_imminent(struct vo *vo) { assert(vo->num_video_queue > 0); - vo->driver->draw_image(vo, vo->video_queue[0]); + struct mp_image *img = vo->video_queue[0]; shift_queue(vo); + vo->driver->draw_image(vo, img); vo->hasframe = true; } |