summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/nvdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c
index 0a39927031..da4451a739 100644
--- a/libavcodec/nvdec.c
+++ b/libavcodec/nvdec.c
@@ -532,8 +532,8 @@ int ff_nvdec_frame_params(AVCodecContext *avctx,
}
frames_ctx->format = AV_PIX_FMT_CUDA;
- frames_ctx->width = avctx->coded_width;
- frames_ctx->height = avctx->coded_height;
+ frames_ctx->width = (avctx->coded_width + 1) & ~1;
+ frames_ctx->height = (avctx->coded_height + 1) & ~1;
frames_ctx->initial_pool_size = dpb_size;
switch (sw_desc->comp[0].depth) {