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 E52B14402C for ; Fri, 23 Sep 2022 18:31:26 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3D1FD68BC09; Fri, 23 Sep 2022 21:31:24 +0300 (EEST) Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BA8A568B96D for ; Fri, 23 Sep 2022 21:31:17 +0300 (EEST) Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-1280590722dso1440372fac.1 for ; Fri, 23 Sep 2022 11:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=h7lZQkMjWDP7pG5S7x8rCnmHpDkXQ2BMNU09TFQwxow=; b=dS6GC533BltgbP761WQWBrmpJgVyXj+L3aCI+Q8Y7nXtzOfUi8hwEWzlqBc55iDwWj L4onk06WDOCDHYeO9sUZmZ7+4/H9v6rZogf6tCBMDEQy0e3qxvtHAIEOMG4cOazUd0Vw VadURk4n1krFT4oB0Ihhv7P95cHP6ghKrdRKtSkenPpsr1tTESH0fqq9keJsfL/+Rlls vDzTn/VvqqmiWGuI3G1HUZHjHjb1fjQXcpQwo4UsivKQoKQB8Jpn/s9bDn1IqwHwyYHg cR8qTwAzCupHd9oDXImPUFmRrWMGOc4idrwKJV9gnAIGJ0VKU3V9d32JtrjdOonXdBlr buWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=h7lZQkMjWDP7pG5S7x8rCnmHpDkXQ2BMNU09TFQwxow=; b=UqMA7X7NYM/oaYUtJ4HPP50Mw2vjGhm4Ig0rHAGZcao98X+uzBLYLLsa2C1UyIMt4l PPtG3RuRkh3H3P0MXGp1WQ+Xq3s4kWdQ/hgI9v1YY39JlDCGNlm8uEHUhJ63L+8q3/iO NkL0EJX1rghR1W7+fbfniDbgOubGAkBOFdYKLGsbd4pp9mViyftMLKtE4NnK+qvHI6z2 uSQyWj0mc/aG3bVRPGZ6TsYCooiDEgq3sY8VO0xNzrvXDt89jrbdbajlu17pDt1roVRJ Uf5rm3Y4tyA26HtOHOE1+3hZlFE151lYIypmEQi8ZKCZ5vsCZfUpUTtl+jcMJl/2Cu21 mfrw== X-Gm-Message-State: ACrzQf0blvMNB1DEiz3JEeEVtqV55/L3Df9liAygap35pL3fMxmrTCeA Yewq61Rm/1ffbgxb0JqlPkG9kwAqlUk= X-Google-Smtp-Source: AMsMyM5UD6c63PXY2fBUUb/bpHy+ROJpruhiFAIX4fvLhxgVa4LaRqpVmzvs8UOJ42QCFI/12Hn4QA== X-Received: by 2002:a05:6870:c34b:b0:12b:3ba8:1a92 with SMTP id e11-20020a056870c34b00b0012b3ba81a92mr12397515oak.114.1663957875923; Fri, 23 Sep 2022 11:31:15 -0700 (PDT) Received: from [192.168.0.13] ([191.97.187.183]) by smtp.gmail.com with ESMTPSA id r6-20020a056871088600b0012796e8033dsm4537820oaq.57.2022.09.23.11.31.14 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Sep 2022 11:31:15 -0700 (PDT) Message-ID: <5af5416b-1acf-9d80-6de2-d13db9e17c0e@gmail.com> Date: Fri, 23 Sep 2022 15:31:15 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] A-pac demuxer and decoder 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 9/21/2022 4:23 AM, Paul B Mahol wrote: > Patches attached. [...] > +static av_cold int apac_close(AVCodecContext *avctx) > +{ > + APACContext *s = avctx->priv_data; > + > + av_freep(&s->bitstream); > + s->bitstream_size = 0; > + > + for (int ch = 0; ch < avctx->ch_layout.nb_channels; ch++) { for (int ch = 0; ch < FF_ARRAY_ELEMS(s->ch); ch++) As Andreas mentioned on IRC, this will crash if you try to initialize the decoder by setting more than 2 channels otherwise. > + ChContext *c = &s->ch[ch]; > + > + av_audio_fifo_free(c->samples); > + } > + > + return 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".