cuda: initialize hwframes format

In retrospect, this seems obvious, but ffmpeg didn't complain until
a recent update.
This commit is contained in:
Philip Langdale 2016-09-28 12:06:56 -07:00 committed by wm4
parent b344da22ae
commit 1557ca6712
1 changed files with 4 additions and 0 deletions

View File

@ -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: