Message ID | tencent_22559F12AB0B4EC9707D2DF29AC040DE9A08@qq.com |
---|---|
State | Accepted |
Commit | 90bbe1e8e2d3d832a80768a6820f995153951a81 |
Headers | show |
Series | [FFmpeg-devel,1/5] avutil/hwcontext: Don't assume device_uninit is reentrant | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index e23bad230f..e8c6256a73 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; }