summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/decode/cuda.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/decode/cuda.c b/video/decode/cuda.c
index f41aed2e7c..f9dd418fd5 100644
--- a/video/decode/cuda.c
+++ b/video/decode/cuda.c
@@ -57,6 +57,7 @@ static int init_decoder(struct lavc_ctx *ctx, int w, int h)
AVCodecContext *avctx = ctx->avctx;
AVCUDADeviceContext *device_hwctx;
AVHWDeviceContext *device_ctx;
+ AVHWFramesContext *hwframe_ctx;
CUVIDContext *priv = ctx->hwdec_priv;
int ret = 0;
@@ -89,6 +90,9 @@ static int init_decoder(struct lavc_ctx *ctx, int w, int h)
goto error;
}
+ hwframe_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data;
+ hwframe_ctx->format = AV_PIX_FMT_CUDA;
+
return 0;
error: