mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-26 00:31:12 +00:00
avutil/hwcontext_cuda: Only handle CUDA hardware frames
This commit is contained in:
parent
741565a1e6
commit
30b28f9a83
@ -212,6 +212,10 @@ static int cuda_transfer_data(AVHWFramesContext *ctx, AVFrame *dst,
|
|||||||
CUcontext dummy;
|
CUcontext dummy;
|
||||||
int i, ret;
|
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));
|
ret = CHECK_CU(cu->cuCtxPushCurrent(hwctx->cuda_ctx));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user