From 3823d5eb7efad4d35c5c8e49f95656ec781c5584 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 13 Apr 2015 18:33:06 +0200 Subject: vo_rpi: explicitly reference MMAL VC driver This is optional, but ensures that linking with -Wl,--as-needed does not drop the MMAL VC driver. The driver normally "registers" itself in the library constructor, but since no symbols are explicitly referenced, the linker could remove it with as-needed enabled. --- video/out/vo_rpi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/video/out/vo_rpi.c b/video/out/vo_rpi.c index 48827b8a67..c60218d575 100644 --- a/video/out/vo_rpi.c +++ b/video/out/vo_rpi.c @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -488,6 +489,8 @@ static void uninit(struct vo *vo) if (p->display) vc_dispmanx_display_close(p->display); + + mmal_vc_deinit(); } static int preinit(struct vo *vo) @@ -500,6 +503,11 @@ static int preinit(struct vo *vo) bcm_host_init(); + if (mmal_vc_init()) { + MP_FATAL(vo, "Could not initialize MMAL.\n"); + return -1; + } + p->display = vc_dispmanx_display_open(p->display_nr); p->update = vc_dispmanx_update_start(0); if (!p->display || !p->update) { -- cgit v1.2.3