diff options
author | Philip Langdale <philipl@overt.org> | 2016-09-28 12:06:56 -0700 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-28 21:10:15 +0200 |
commit | 1557ca6712ef86e03fd4109311f10d6c45875fc4 (patch) | |
tree | 629e4b155492cba9b3aca1c4ca4c1f9ba0dca464 /video | |
parent | b344da22ae605b01be64ad0cbf75265087d16ee5 (diff) | |
download | mpv-1557ca6712ef86e03fd4109311f10d6c45875fc4.tar.bz2 mpv-1557ca6712ef86e03fd4109311f10d6c45875fc4.tar.xz |
cuda: initialize hwframes format
In retrospect, this seems obvious, but ffmpeg didn't complain until
a recent update.
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/cuda.c | 4 |
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: |