|
|
|
@ -226,14 +226,10 @@ static av_cold int cudacolorspace_config_props(AVFilterLink* outlink) |
|
|
|
|
AVFilterContext* ctx = outlink->src; |
|
|
|
|
AVFilterLink* inlink = outlink->src->inputs[0]; |
|
|
|
|
CUDAColorspaceContext* s = ctx->priv; |
|
|
|
|
AVHWFramesContext* frames_ctx = |
|
|
|
|
(AVHWFramesContext*)inlink->hw_frames_ctx->data; |
|
|
|
|
AVCUDADeviceContext* device_hwctx = frames_ctx->device_ctx->hwctx; |
|
|
|
|
AVHWFramesContext* frames_ctx; |
|
|
|
|
AVCUDADeviceContext* device_hwctx; |
|
|
|
|
int ret; |
|
|
|
|
|
|
|
|
|
s->hwctx = device_hwctx; |
|
|
|
|
s->cu_stream = s->hwctx->stream; |
|
|
|
|
|
|
|
|
|
outlink->w = inlink->w; |
|
|
|
|
outlink->h = inlink->h; |
|
|
|
|
|
|
|
|
@ -241,6 +237,12 @@ static av_cold int cudacolorspace_config_props(AVFilterLink* outlink) |
|
|
|
|
if (ret < 0) |
|
|
|
|
return ret; |
|
|
|
|
|
|
|
|
|
frames_ctx = (AVHWFramesContext*)inlink->hw_frames_ctx->data; |
|
|
|
|
device_hwctx = frames_ctx->device_ctx->hwctx; |
|
|
|
|
|
|
|
|
|
s->hwctx = device_hwctx; |
|
|
|
|
s->cu_stream = s->hwctx->stream; |
|
|
|
|
|
|
|
|
|
if (inlink->sample_aspect_ratio.num) { |
|
|
|
|
outlink->sample_aspect_ratio = av_mul_q( |
|
|
|
|
(AVRational){outlink->h * inlink->w, outlink->w * inlink->h}, |
|
|
|
|