hwcontext: Perform usual uninitialisation on derived frames contexts

pull/279/head
Mark Thompson 8 years ago
parent caecb85014
commit e412d683fe
  1. 7
      libavutil/hwcontext.c

@ -205,10 +205,6 @@ static void hwframe_ctx_free(void *opaque, uint8_t *data)
{
AVHWFramesContext *ctx = (AVHWFramesContext*)data;
if (ctx->internal->source_frames) {
av_buffer_unref(&ctx->internal->source_frames);
} else {
if (ctx->internal->pool_internal)
av_buffer_pool_uninit(&ctx->internal->pool_internal);
@ -217,7 +213,8 @@ static void hwframe_ctx_free(void *opaque, uint8_t *data)
if (ctx->free)
ctx->free(ctx);
}
av_buffer_unref(&ctx->internal->source_frames);
av_buffer_unref(&ctx->device_ref);

Loading…
Cancel
Save