diff options
Diffstat (limited to 'video/out/opengl/hwdec_rpi.c')
-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); |