From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2384948AED for ; Wed, 1 May 2024 19:02:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B1B0668D743; Wed, 1 May 2024 22:02:22 +0300 (EEST) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 96AEC68D6FF for ; Wed, 1 May 2024 22:02:15 +0300 (EEST) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-6ecff9df447so6871093b3a.1 for ; Wed, 01 May 2024 12:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714590133; x=1715194933; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lpEUYw2FknFM18yXcbGN88eFb5fSoKujFrO2AfR/7es=; b=bF9TCJyArgcwzypx2WZylTEla0rUS1uX8Kn7zQlGrwxMkuhwA7HZoWNNeZcAxTquYf IMVh+U3ODfn7PMDhO0dMAoCXTdVOT9exsdLqlnHMd+T3LLZsZPeJNqwjnhGoybTc9Fw0 CQVzU5RPidO+YYCEFCudShsVlR5lRd6VIHg5IqIYayEt3UI7E5gdyAwOlnYN0ixxVSii wE4NKyCN2+Y3IzGQbdbkoZtaKooxVvPxln2WIeiesPFwqV4kCLSPe3hvj/KsMS+S3/af DS1FKO5PkAswieo58j2PByL8V2tCsioYOG/udSnLT1+BmkhsXfZUkfkQCEzJYLNuSw8c ZBmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714590133; x=1715194933; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lpEUYw2FknFM18yXcbGN88eFb5fSoKujFrO2AfR/7es=; b=XaXpHAjLXncoR5MOz6PzEdlWy7kf4Sh/XbfSh6B6J68ySoFF6F/tjrDG4iVjJ+z+T0 XjtEc/ZlJ9s3NfKuoWL7LWv65hLvVh0ZMhfjVwi7GiODrqBTEOUasrm+tynuw4F1buef Z3Kla9/lct2jR7YdOrgXmOuhX9iMmrwNFDwZrre707SnonSb7gLk4jiRiAsMQnBDhWu3 TqpJ407pST9PbsuexTLtLN0Dcyk1U1vxTR6JtMX8MgTUot0Q6YS+n1SkxKMee3uUZDoi UH9kasR0gUuVilJgKNm4Hjo/wNLIK1p6Trb03vkiacFufjLjXXSn5bggGPQUNVnYpTwW Ju2A== X-Gm-Message-State: AOJu0YyeC8lzQ2Ceb+Cmsv2tITL5d1uKtbo7w/+BdoPl6M0SCD5Ll+Si 0dVwHTE5AoCWtgeraFmE8SGqzAo4aP6hcpwYXelyyOPF2QQ+W9LWJu3OmA== X-Google-Smtp-Source: AGHT+IGzKPo0mJmMlBNsBDc8KZ4ihzY+7i09LiTEou1MEDi8aFmZoF/Jf/aGCyd3OT9b/UvuPtsqkA== X-Received: by 2002:a05:6a00:23d5:b0:6ed:4288:650a with SMTP id g21-20020a056a0023d500b006ed4288650amr3191123pfc.19.1714590133299; Wed, 01 May 2024 12:02:13 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id g14-20020a62f94e000000b006f2d97c3e87sm16867184pfm.125.2024.05.01.12.02.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 12:02:12 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 1 May 2024 16:01:56 -0300 Message-ID: <20240501190156.36095-3-jamrial@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240501190156.36095-1-jamrial@gmail.com> References: <20240501190156.36095-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/avcodec: free decoded_side_data in ff_codec_close() when decoding X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: It's set by the library, so it should be freed when closing the context. Signed-off-by: James Almer --- libavcodec/avcodec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index e560efff6a..189a0a2193 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -463,7 +463,9 @@ av_cold void ff_codec_close(AVCodecContext *avctx) av_freep(&avctx->coded_side_data[i].data); av_freep(&avctx->coded_side_data); avctx->nb_coded_side_data = 0; - } + } else if (av_codec_is_decoder(avctx->codec)) + av_frame_side_data_free(&avctx->decoded_side_data, + &avctx->nb_decoded_side_data); av_buffer_unref(&avctx->hw_frames_ctx); av_buffer_unref(&avctx->hw_device_ctx); -- 2.44.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".