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 439D640932 for ; Tue, 1 Feb 2022 16:07:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DD84E68B45F; Tue, 1 Feb 2022 18:07:15 +0200 (EET) Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com [209.85.221.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF3C868B43A for ; Tue, 1 Feb 2022 18:07:09 +0200 (EET) Received: by mail-vk1-f172.google.com with SMTP id w17so10795897vko.9 for ; Tue, 01 Feb 2022 08:07:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=gKBC2ggwWfvV8pVRRA79UnK56Tu1P3dtiOA4UEvM/m8=; b=gXz/7B9YupUKM2ChdPEXwlNqkTReozttX8qYgrXunsLft0HM1V+8cxsOv7nqXYxx0X NOMe8i7XxpIQPOcpvNiVr/aYn2ks+73ahgPFCLpReYw2F7dmx4cAJYJCVM6ZK2LDJS5Y oUvckSEuMw+mst2hu1OfTZ3yBZ16dhRci8zyUW5EdcpHCFae1pH5L5jEhCj/gL49X3BZ D+NPVMccxlT8GB6syJo1nPufg1FnUXLkT+huPtWdfG3JuBHz4ZrUfH68o6XBAgcncUZX PcFhi/TrklD+1XbnHb6hxjHiZHBKEDdNco1+UC0cPGzzO7sp4wfns4Tqm/qhEUdx2sW9 gzHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=gKBC2ggwWfvV8pVRRA79UnK56Tu1P3dtiOA4UEvM/m8=; b=GCQMATZ7bD+lkX1Zu4uYamsEGGjx3QwRzwcK407wJ0hu2baQgj6TDCUhHqs2f1MULq PTX2MRJcNWR/6vSXAJJMfmkyhXPiME8fAgC8x48PXEnnLVWoRKG4sDt+sKlfe55MHnLW vr5JlvqfKuwFi29sWcIhU7K7gkeUIqcnaaWHs0ROywCe2UDz6DqWu9r/7ylKhzehQgkJ GLULr5BZtbsVME02F/YkdvU+hHRkGl/v7eaPnB0qThwjaEBCuEkOrhG06x+S6gD+Hrno S86bUfPCMlTehG2+wb6TwnlPVhnb/dnFTD1n7/zlh2KNB8O5b8HICWQe7THWPt2xASzZ jYDw== X-Gm-Message-State: AOAM532D2Zu5euAUV5NIKJFCB3FhvhTUdtr/woB+IsshcTbWW8RgvoIp 2dj6Q+++BKLVhM7ohOW1SF4sD+0T2ww= X-Google-Smtp-Source: ABdhPJwxZw/zEm2eSo7Km7X0Z2lwI5ad8e6E9SprxLDPr9tMChfAqT9qVeipIcygMGZKhFPkOF0FgA== X-Received: by 2002:a1f:914f:: with SMTP id t76mr10778344vkd.17.1643731624022; Tue, 01 Feb 2022 08:07:04 -0800 (PST) Received: from [192.168.0.10] ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id v129sm2185706vsb.15.2022.02.01.08.07.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Feb 2022 08:07:03 -0800 (PST) Message-ID: Date: Tue, 1 Feb 2022 13:07:01 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220201150634.4076-1-jamrial@gmail.com> From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avcodec/libdav1d: free the Dav1dData packet on dav1d_send_data() failure 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 2/1/2022 12:57 PM, Ronald S. Bultje wrote: > Hi, > > On Tue, Feb 1, 2022 at 10:07 AM James Almer wrote: > >> We still own it on failure, and there's no point trying to feed it again. >> >> Signed-off-by: James Almer >> --- >> libavcodec/libdav1d.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c >> index 29fa4f9c3d..872e60e000 100644 >> --- a/libavcodec/libdav1d.c >> +++ b/libavcodec/libdav1d.c >> @@ -347,8 +347,10 @@ static int libdav1d_receive_frame(AVCodecContext *c, >> AVFrame *frame) >> if (res < 0) { >> if (res == AVERROR(EINVAL)) >> res = AVERROR_INVALIDDATA; >> - if (res != AVERROR(EAGAIN)) >> + if (res != AVERROR(EAGAIN)) { >> + dav1d_data_unref(data); >> return res; >> + } >> } >> >> res = dav1d_get_picture(dav1d->c, p); >> -- >> 2.34.1 >> > > LGTM. > > You could at your choice maybe mention that this fixes dav1d #383 and (the > FFmpeg portion of) VLC #26259. Added that, applied and backported. Thanks. > > Ronald > _______________________________________________ > 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". _______________________________________________ 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".