mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avcodec/cuviddec: explicitly synchronize cuMemcpy calls
This commit is contained in:
parent
9b82e333b7
commit
93d1756af2
@ -550,12 +550,16 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame)
|
|||||||
.Height = avctx->height >> (i ? 1 : 0),
|
.Height = avctx->height >> (i ? 1 : 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
ret = CHECK_CU(ctx->cudl->cuMemcpy2D(&cpy));
|
ret = CHECK_CU(ctx->cudl->cuMemcpy2DAsync(&cpy, device_hwctx->stream));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
offset += avctx->height;
|
offset += avctx->height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = CHECK_CU(ctx->cudl->cuStreamSynchronize(device_hwctx->stream));
|
||||||
|
if (ret < 0)
|
||||||
|
goto error;
|
||||||
} else if (avctx->pix_fmt == AV_PIX_FMT_NV12 ||
|
} else if (avctx->pix_fmt == AV_PIX_FMT_NV12 ||
|
||||||
avctx->pix_fmt == AV_PIX_FMT_P010 ||
|
avctx->pix_fmt == AV_PIX_FMT_P010 ||
|
||||||
avctx->pix_fmt == AV_PIX_FMT_P016) {
|
avctx->pix_fmt == AV_PIX_FMT_P016) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user