From ac5b45abab3815c36c9110f979b547b2189e739d Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler Date: Sat, 17 Oct 2020 18:16:54 +0200 Subject: avcodec/nvdec: add av1 hwaccel Signed-off-by: Timo Rothenpieler Co-authored-by: James Almer --- libavcodec/nvdec.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavcodec/nvdec.c') diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c index 52a431c54d..48281293ce 100644 --- a/libavcodec/nvdec.c +++ b/libavcodec/nvdec.c @@ -62,6 +62,9 @@ typedef struct NVDECFramePool { static int map_avcodec_id(enum AVCodecID id) { switch (id) { +#if CONFIG_AV1_NVDEC_HWACCEL + case AV_CODEC_ID_AV1: return cudaVideoCodec_AV1; +#endif case AV_CODEC_ID_H264: return cudaVideoCodec_H264; case AV_CODEC_ID_HEVC: return cudaVideoCodec_HEVC; case AV_CODEC_ID_MJPEG: return cudaVideoCodec_JPEG; @@ -258,6 +261,7 @@ int ff_nvdec_decode_uninit(AVCodecContext *avctx) NVDECContext *ctx = avctx->internal->hwaccel_priv_data; av_freep(&ctx->bitstream); + av_freep(&ctx->bitstream_internal); ctx->bitstream_len = 0; ctx->bitstream_allocated = 0; -- cgit v1.2.3