aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-12-01 22:01:41 +0000
committerMark Thompson <sw@jkqxz.net>2017-12-04 23:21:35 +0000
commit9f7cc87baf2ce407cd1d537777e572ebb4eaa13c (patch)
tree0e09bd5a4f6cefec3e945e1cdc2fdd96ca4bd6f1
parent312b00de8f8b15f416daf90865da3be9180a09c8 (diff)
downloadffmpeg-9f7cc87baf2ce407cd1d537777e572ebb4eaa13c.tar.gz
rkmpp: Add hardware config information
This is not strictly required here because the rkmpp decoder does not call ff_get_format(), but it may be helpful metadata for users.
-rw-r--r--libavcodec/rkmppdec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c
index bdf4dc4208..4ec61cbb35 100644
--- a/libavcodec/rkmppdec.c
+++ b/libavcodec/rkmppdec.c
@@ -28,6 +28,7 @@
#include "avcodec.h"
#include "decode.h"
+#include "hwaccel.h"
#include "internal.h"
#include "libavutil/buffer.h"
#include "libavutil/common.h"
@@ -563,6 +564,10 @@ static void rkmpp_flush(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "Failed to reset MPI (code = %d)\n", ret);
}
+static const AVCodecHWConfigInternal *rkmpp_hw_configs[] = {
+ HW_CONFIG_INTERNAL(DRM_PRIME),
+ NULL
+};
#define RKMPP_DEC_CLASS(NAME) \
static const AVClass rkmpp_##NAME##_dec_class = { \
@@ -587,6 +592,7 @@ static void rkmpp_flush(AVCodecContext *avctx)
.caps_internal = AV_CODEC_CAP_AVOID_PROBING, \
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \
AV_PIX_FMT_NONE}, \
+ .hw_configs = rkmpp_hw_configs, \
.bsfs = BSFS, \
};