ffmpeg | branch: master | Zhao Zhili <quinkbl...@foxmail.com> | Tue Feb 20 20:08:54 2024 +0800| [90bbe1e8e2d3d832a80768a6820f995153951a81] | committer: Zhao Zhili
avutil/hwcontext: Don't assume device_uninit is reentrant device_uninit will be called by hwdevice_ctx_free. vulkan_device_uninit is non-reentrant. Signed-off-by: Zhao Zhili <zhiliz...@tencent.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=90bbe1e8e2d3d832a80768a6820f995153951a81 --- libavutil/hwcontext.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 63fc1a6a22..1d2c2d7920 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -205,18 +205,11 @@ fail: int av_hwdevice_ctx_init(AVBufferRef *ref) { AVHWDeviceContext *ctx = (AVHWDeviceContext*)ref->data; - int ret; + int ret = 0; - if (ctx->internal->hw_type->device_init) { + if (ctx->internal->hw_type->device_init) ret = ctx->internal->hw_type->device_init(ctx); - if (ret < 0) - goto fail; - } - return 0; -fail: - if (ctx->internal->hw_type->device_uninit) - ctx->internal->hw_type->device_uninit(ctx); return ret; } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".