mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-29 02:42:21 +00:00
hwcontext: Perform usual uninitialisation on derived frames contexts
This commit is contained in:
parent
caecb85014
commit
e412d683fe
@ -205,19 +205,16 @@ static void hwframe_ctx_free(void *opaque, uint8_t *data)
|
|||||||
{
|
{
|
||||||
AVHWFramesContext *ctx = (AVHWFramesContext*)data;
|
AVHWFramesContext *ctx = (AVHWFramesContext*)data;
|
||||||
|
|
||||||
if (ctx->internal->source_frames) {
|
if (ctx->internal->pool_internal)
|
||||||
av_buffer_unref(&ctx->internal->source_frames);
|
av_buffer_pool_uninit(&ctx->internal->pool_internal);
|
||||||
|
|
||||||
} else {
|
if (ctx->internal->hw_type->frames_uninit)
|
||||||
if (ctx->internal->pool_internal)
|
ctx->internal->hw_type->frames_uninit(ctx);
|
||||||
av_buffer_pool_uninit(&ctx->internal->pool_internal);
|
|
||||||
|
|
||||||
if (ctx->internal->hw_type->frames_uninit)
|
if (ctx->free)
|
||||||
ctx->internal->hw_type->frames_uninit(ctx);
|
ctx->free(ctx);
|
||||||
|
|
||||||
if (ctx->free)
|
av_buffer_unref(&ctx->internal->source_frames);
|
||||||
ctx->free(ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
av_buffer_unref(&ctx->device_ref);
|
av_buffer_unref(&ctx->device_ref);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user