vo_opengl: rpi: fix glaring memory leak

This was in previously inactive code (uploading yuv420p), so it did not
matter.
This commit is contained in:
wm4 2016-09-30 13:53:12 +02:00
parent ab07caf39d
commit 51f10c512e
1 changed files with 5 additions and 2 deletions

View File

@ -328,9 +328,12 @@ static int overlay_frame(struct gl_hwdec *hw, struct mp_image *hw_image)
update_overlay(hw, true);
struct mp_image *mpi = mp_image_new_ref(hw_image);
if (hw_image->imgfmt != IMGFMT_MMAL)
struct mp_image *mpi = NULL;
if (hw_image->imgfmt == IMGFMT_MMAL) {
mpi = mp_image_new_ref(hw_image);
} else {
mpi = upload(hw, hw_image);
}
if (!mpi) {
disable_renderer(hw);