summaryrefslogtreecommitdiff
path: root/libavcodec/mmaldec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-14 13:40:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-14 13:40:58 +0200
commit6e86ee97c8eeb44b6e428861a69f12f2074eeb0f (patch)
tree6b9a73b418018a53f3607577163760a3ed49120b /libavcodec/mmaldec.c
parent7c521d4528927a51449ae8977413cda4d790c6fb (diff)
parent49e531ff4706279c7eed774f2c8b896942924ce2 (diff)
downloadffmpeg-6e86ee97c8eeb44b6e428861a69f12f2074eeb0f.tar.gz
Merge commit '49e531ff4706279c7eed774f2c8b896942924ce2'
* commit '49e531ff4706279c7eed774f2c8b896942924ce2': mmal: Reference MMAL VC lib explicitly Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mmaldec.c')
-rw-r--r--libavcodec/mmaldec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
index ff49b97356..aa46621d06 100644
--- a/libavcodec/mmaldec.c
+++ b/libavcodec/mmaldec.c
@@ -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)
av_bitstream_filter_close(ctx->bsfc);
+ mmal_vc_deinit();
+
return 0;
}
@@ -321,6 +324,11 @@ static av_cold int ffmmal_init_decoder(AVCodecContext *avctx)
bcm_host_init();
+ if (mmal_vc_init()) {
+ av_log(avctx, AV_LOG_ERROR, "Cannot initialize MMAL VC driver!\n");
+ return AVERROR(ENOSYS);
+ }
+
if ((ret = ff_get_format(avctx, avctx->codec->pix_fmts)) < 0)
return ret;