From: softworkz <softwo...@hotmail.com> Signed-off-by: softworkz <softwo...@hotmail.com> --- libavfilter/vf_hwmap.c | 4 ++-- libavfilter/vf_hwupload.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index 2e03dfc1fe..b79cf6732c 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -82,8 +82,8 @@ static int hwmap_config_output(AVFilterLink *outlink) goto fail; } - err = av_hwdevice_ctx_create_derived(&device, type, - hwfc->device_ref, 0); + err = av_hwdevice_ctx_get_or_create_derived(&device, type, + hwfc->device_ref, 0); if (err < 0) { av_log(avctx, AV_LOG_ERROR, "Failed to created derived " "device context: %d.\n", err); diff --git a/libavfilter/vf_hwupload.c b/libavfilter/vf_hwupload.c index dbc41734cc..41ee0e43c4 100644 --- a/libavfilter/vf_hwupload.c +++ b/libavfilter/vf_hwupload.c @@ -51,7 +51,7 @@ static int hwupload_query_formats(AVFilterContext *avctx) /* We already have a specified device. */ } else if (avctx->hw_device_ctx) { if (ctx->device_type) { - err = av_hwdevice_ctx_create_derived( + err = av_hwdevice_ctx_get_or_create_derived( &ctx->hwdevice_ref, av_hwdevice_find_type_by_name(ctx->device_type), avctx->hw_device_ctx, 0); -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".