From patchwork Mon Sep 14 05:27:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22354 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id A398044A49B for ; Mon, 14 Sep 2020 08:28:39 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8A60968BBC2; Mon, 14 Sep 2020 08:28:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 03B5868B86B for ; Mon, 14 Sep 2020 08:28:36 +0300 (EEST) Received: by mail-ej1-f65.google.com with SMTP id q13so21314510ejo.9 for ; Sun, 13 Sep 2020 22:28:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IRS5iIGeyRsc/iGJQ+LSDEKApOnxe9oJYFrJl+aVICw=; b=JuNCnJgSiXqcegqnbFfTkFBEAWnd+flBGDcjqgiT345mD896vDb5KpMdD5jRY3zA27 401e2O9zZoHusXfPKVf7IYOyeUaJlc4xCDpb8HzUidbFyfBF/q3+6h9f9wGOrqW6HJ5W cF3f/OO9j2+R3yrY7PDE1TzaafuiKwldJH8lSoV/j4WJsma1TpMhsKHasFzDfaGrv0k+ ATWSH6zJEed2Mt99bMpxhr/SXevJywWavgMfHjxmmRCfy52+EuIh8mJrDc4MSbpLdQQd QrMpTppLHZXq3r2c6vQ/UYJp1GhHOHAVt3DSn3gL2B3jePK61PyZH5SH8vqXEng/xmwL Isbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IRS5iIGeyRsc/iGJQ+LSDEKApOnxe9oJYFrJl+aVICw=; b=E1omOLa/P/oTjmNB7t+vni2gOvRADe3E3PDy1CcdyF02dkrLBImS/fAmIoagwYbx+o in+Joenl0a30yXJmdjvZtwFIW74kD3aW5ytTP/PeQIknKrpyARWvwAmH2VHODAKuHpqo zHaL5V1G1nSVzIFfnPXLa9VpRsr2w8I0NdqBEVjT85nDLTmNBeir9pRKutQZyv+rc1vU vK/VqlellVVYPhVoW3XNmqpcU0KZ4xAq7+b/QItdNobA1FmBzdtKgWaar2BYtncsnK29 Tylk3iS0D+2VZtngBXnyN+VnvuC9Zr4Lfp5v223C2lBp9D1tXBMaojo1VEKCfGRlE/pg u4HQ== X-Gm-Message-State: AOAM530qRIa3/zAIIRR8+VkmbbuzXVMIJK60mJ9h7ymr/IZfp+QTg84Y E93vbPT3eVFyv2Ryq2otIU3TAeAUA/I= X-Google-Smtp-Source: ABdhPJyBTug7VsdCUfRL5VCVevJYQ2pU0X3dhHbIS6IQ7JIszNLPt8jQKfSr9hUUANZ67UuoYwtnNA== X-Received: by 2002:a17:906:a4b:: with SMTP id x11mr13725654ejf.368.1600061316177; Sun, 13 Sep 2020 22:28:36 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id f4sm8251421edm.76.2020.09.13.22.28.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Sep 2020 22:28:35 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 14 Sep 2020 07:27:45 +0200 Message-Id: <20200914052747.124118-22-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> References: <20200913025753.274772-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 38/40] avcodec/ffv1enc: Fix memleaks on init failure X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The FFV1 encoder has so far not cleaned up after itself in this case; but it can be done easily by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt --- libavcodec/ffv1enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 97dc15eac9..611b250e96 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -1354,4 +1354,5 @@ AVCodec ff_ffv1_encoder = { .defaults = ffv1_defaults, #endif .priv_class = &ffv1_class, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, };