Commit 49e531ff authored by wm4's avatar wm4 Committed by Diego Biurrun

mmal: Reference MMAL VC lib explicitly

This is optional, but ensures that linking with -Wl,--as-needed does not
drop the library containing 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
Signed-off-by: default avatarDiego Biurrun <>
parent 2de76504
......@@ -29,6 +29,7 @@
#include <interface/mmal/util/mmal_util.h>
#include <interface/mmal/util/mmal_util_params.h>
#include <interface/mmal/util/mmal_default_components.h>
#include <interface/mmal/vc/mmal_vc_api.h>
#include "avcodec.h"
#include "internal.h"
......@@ -182,6 +183,8 @@ static av_cold int ffmmal_close_decoder(AVCodecContext *avctx)
if (ctx->bsfc)
return 0;
......@@ -321,6 +324,11 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx)
if (mmal_vc_init()) {
av_log(avctx, AV_LOG_ERROR, "Cannot initialize MMAL VC driver!\n");
if ((ret = ff_get_format(avctx, avctx->codec->pix_fmts)) < 0)
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment