summaryrefslogtreecommitdiff
path: root/libavcodec/cuviddec.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2020-10-01 20:49:59 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2020-10-01 20:49:59 +0200
commitc75756d0473de38c3d41596ed3b7361de93ede7c (patch)
tree2e0f678453660c09bbd23183c30bfe62fd700c88 /libavcodec/cuviddec.c
parentbba626208000c627e3773f248ab15e2081577e05 (diff)
avcodec/cuviddec: use correct type for extradata_size
Diffstat (limited to 'libavcodec/cuviddec.c')
-rw-r--r--libavcodec/cuviddec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c
index 5d099e31a2..aab6d00c8d 100644
--- a/libavcodec/cuviddec.c
+++ b/libavcodec/cuviddec.c
@@ -795,7 +795,7 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
CUcontext cuda_ctx = NULL;
CUcontext dummy;
uint8_t *extradata;
- uint32_t extradata_size;
+ ssize_t extradata_size;
int ret = 0;
enum AVPixelFormat pix_fmts[3] = { AV_PIX_FMT_CUDA,
@@ -955,7 +955,7 @@ static av_cold int cuvid_decode_init(AVCodecContext *avctx)
}
ctx->cuparse_ext = av_mallocz(sizeof(*ctx->cuparse_ext)
- + FFMAX(extradata_size - sizeof(ctx->cuparse_ext->raw_seqhdr_data), 0));
+ + FFMAX(extradata_size - (ssize_t)sizeof(ctx->cuparse_ext->raw_seqhdr_data), 0));
if (!ctx->cuparse_ext) {
ret = AVERROR(ENOMEM);
goto error;