diff options
author | wm4 <wm4@nowhere> | 2016-09-30 13:53:12 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-30 13:53:12 +0200 |
commit | 51f10c512e7ee114f32e7e8323ea3b61c20e3255 (patch) | |
tree | e0a2b7e5b40effa343baf4ea4f247c88721cabb4 /video | |
parent | ab07caf39d8c1c04b841498cc878e85546e2f206 (diff) | |
download | mpv-51f10c512e7ee114f32e7e8323ea3b61c20e3255.tar.bz2 mpv-51f10c512e7ee114f32e7e8323ea3b61c20e3255.tar.xz |
vo_opengl: rpi: fix glaring memory leak
This was in previously inactive code (uploading yuv420p), so it did not
matter.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/hwdec_rpi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/video/out/opengl/hwdec_rpi.c b/video/out/opengl/hwdec_rpi.c index 6204f461d1..fdcd850138 100644 --- a/video/out/opengl/hwdec_rpi.c +++ b/video/out/opengl/hwdec_rpi.c @@ -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); |