aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out/opengl/hwdec_rpi.c
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2017-08-11 13:02:13 +0200
committerGravatar wm4 <wm4@nowhere>2017-08-11 21:29:35 +0200
commit697c4389a9e650935cee934009bdbd42dc4e5cfa (patch)
treeca9fc5d3ab28e70c42e78c9ac3eb4c9cb9b9cd32 /video/out/opengl/hwdec_rpi.c
parentde3eecce7fabc23eb76558310040d54fd2528254 (diff)
rpi: fix build
Runtime untested, because I get this: [vo/rpi] Could not get DISPMANX objects. This happened even when building older git versions, and on a RPI image that hasn't changed in the recent years. I don't know how to make this POS work again, so I guess if there's a bug in the new code, it will remain broken.
Diffstat (limited to 'video/out/opengl/hwdec_rpi.c')
-rw-r--r--video/out/opengl/hwdec_rpi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/video/out/opengl/hwdec_rpi.c b/video/out/opengl/hwdec_rpi.c
index 72270b5787..6f39c3e330 100644
--- a/video/out/opengl/hwdec_rpi.c
+++ b/video/out/opengl/hwdec_rpi.c
@@ -36,6 +36,7 @@
#include "hwdec.h"
#include "common.h"
+#include "ra_gl.h"
struct priv {
struct mp_log *log;
@@ -125,13 +126,13 @@ static void disable_renderer(struct ra_hwdec *hw)
static void update_overlay(struct ra_hwdec *hw, bool check_window_only)
{
struct priv *p = hw->priv;
- GL *gl = hw->gl;
+ GL *gl = ra_is_gl(hw->ra) ? ra_gl_get(hw->ra) : NULL;
MMAL_PORT_T *input = p->renderer->input[0];
struct mp_rect src = p->src;
struct mp_rect dst = p->dst;
int defs[4] = {0, 0, 0, 0};
- int *z = mpgl_get_native_display(gl, "MPV_RPI_WINDOW");
+ int *z = gl ? mpgl_get_native_display(gl, "MPV_RPI_WINDOW") : NULL;
if (!z)
z = defs;
@@ -285,7 +286,7 @@ static int overlay_frame(struct ra_hwdec *hw, struct mp_image *hw_image,
struct priv *p = hw->priv;
if (hw_image && !mp_image_params_equal(&p->params, &hw_image->params)) {
- p->params = *params;
+ p->params = hw_image->params;
disable_renderer(hw);
mp_image_unrefp(&p->current_frame);
@@ -300,7 +301,7 @@ static int overlay_frame(struct ra_hwdec *hw, struct mp_image *hw_image,
p->dst = *dst;
update_overlay(hw, false);
}
- return;
+ return 0; // don't reupload
}
mp_image_unrefp(&p->current_frame);
@@ -382,6 +383,5 @@ const struct ra_hwdec_driver ra_hwdec_rpi_overlay = {
.imgfmts = {IMGFMT_MMAL, IMGFMT_420P, 0},
.init = create,
.overlay_frame = overlay_frame,
- .overlay_adjust = overlay_adjust,
.uninit = destroy,
};