You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
hwcontext: Do not call device_init again when deriving an existing device
The change in 309d660775
to call device_init
when doing derivation missed this case - we should only call it if we
actually made a new device.
This commit is contained in:
@@ -646,6 +646,9 @@ int av_hwdevice_ctx_create_derived(AVBufferRef **dst_ref_ptr,
|
|||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
ret = av_hwdevice_ctx_init(dst_ref);
|
||||||
|
if (ret < 0)
|
||||||
|
goto fail;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (ret != AVERROR(ENOSYS))
|
if (ret != AVERROR(ENOSYS))
|
||||||
@@ -658,10 +661,6 @@ int av_hwdevice_ctx_create_derived(AVBufferRef **dst_ref_ptr,
|
|||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
ret = av_hwdevice_ctx_init(dst_ref);
|
|
||||||
if (ret < 0)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
*dst_ref_ptr = dst_ref;
|
*dst_ref_ptr = dst_ref;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user