diff options
author | wm4 <wm4@nowhere> | 2017-01-16 15:35:19 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-16 16:10:39 +0100 |
commit | 3a85976f8eb2463ac1cda92d9f9047ed873baa4c (patch) | |
tree | af03684810fb064cc6f796dc52f646af89e73b56 /video | |
parent | 6b006637559d331ef3b85b0925f2282d6c8434b8 (diff) | |
download | mpv-3a85976f8eb2463ac1cda92d9f9047ed873baa4c.tar.bz2 mpv-3a85976f8eb2463ac1cda92d9f9047ed873baa4c.tar.xz |
cuda: fix AVHWFramesContext initialization
This was partially done. Strangely it worked anyway.
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/cuda.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/video/decode/cuda.c b/video/decode/cuda.c index 7454043fdf..d1fd2941c2 100644 --- a/video/decode/cuda.c +++ b/video/decode/cuda.c @@ -60,6 +60,12 @@ static int init_decoder(struct lavc_ctx *ctx, int w, int h) AVHWFramesContext *hwframe_ctx = (void* )avctx->hw_frames_ctx->data; hwframe_ctx->format = AV_PIX_FMT_CUDA; + hwframe_ctx->width = w; + hwframe_ctx->height = h; + hwframe_ctx->sw_format = avctx->sw_pix_fmt; + + if (av_hwframe_ctx_init(avctx->hw_frames_ctx) < 0) + goto error; return 0; |