diff options
Diffstat (limited to 'video/decode/cuda.c')
-rw-r--r-- | video/decode/cuda.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/decode/cuda.c b/video/decode/cuda.c index f9dd418fd5..b606315906 100644 --- a/video/decode/cuda.c +++ b/video/decode/cuda.c @@ -21,6 +21,7 @@ #include <libavutil/hwcontext_cuda.h> #include "common/av_common.h" +#include "video/fmt-conversion.h" #include "video/decode/lavc.h" typedef struct CUVIDContext { @@ -114,7 +115,7 @@ static void uninit(struct lavc_ctx *ctx) static struct mp_image *process_image(struct lavc_ctx *ctx, struct mp_image *img) { if (img->imgfmt == IMGFMT_CUDA) - img->params.hw_subfmt = IMGFMT_NV12; + img->params.hw_subfmt = pixfmt2imgfmt(ctx->avctx->sw_pix_fmt); return img; } |