Commit 30b28f9a authored by Timo Rothenpieler's avatar Timo Rothenpieler

avutil/hwcontext_cuda: Only handle CUDA hardware frames

parent 741565a1
......@@ -212,6 +212,10 @@ static int cuda_transfer_data(AVHWFramesContext *ctx, AVFrame *dst,
CUcontext dummy;
int i, ret;
if ((src->hw_frames_ctx && ((AVHWFramesContext*)src->hw_frames_ctx->data)->format != AV_PIX_FMT_CUDA) ||
(dst->hw_frames_ctx && ((AVHWFramesContext*)dst->hw_frames_ctx->data)->format != AV_PIX_FMT_CUDA))
return AVERROR(ENOSYS);
ret = CHECK_CU(cu->cuCtxPushCurrent(hwctx->cuda_ctx));
if (ret < 0)
return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment