mirror of https://github.com/mpv-player/mpv
vo_vaapi: fix use-after-free of current frame
This was forgotten when switching vo_vaapi from using draw_image to
draw_frame API
Fixes: 0b70598358
("vo: fully replace draw_image with draw_frame")
This commit is contained in:
parent
15ea0d1987
commit
ff73aeb5c3
|
@ -572,14 +572,12 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame)
|
|||
struct mp_image *dst = p->swdec_surfaces[p->output_surface];
|
||||
if (!dst || va_surface_upload(p, dst, mpi) < 0) {
|
||||
MP_WARN(vo, "Could not upload surface.\n");
|
||||
talloc_free(mpi);
|
||||
return;
|
||||
}
|
||||
mp_image_copy_attributes(dst, mpi);
|
||||
mpi = mp_image_new_ref(dst);
|
||||
mpi = dst;
|
||||
}
|
||||
|
||||
talloc_free(p->output_surfaces[p->output_surface]);
|
||||
p->output_surfaces[p->output_surface] = mpi;
|
||||
|
||||
draw_osd(vo);
|
||||
|
|
Loading…
Reference in New Issue