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 CC69542F6B for ; Wed, 14 Sep 2022 15:22:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 326F168BB2C; Wed, 14 Sep 2022 18:22:14 +0300 (EEST) Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D8C1D68B788 for ; Wed, 14 Sep 2022 18:22:08 +0300 (EEST) Received: by mail-yb1-f175.google.com with SMTP id 130so23263125ybw.8 for ; Wed, 14 Sep 2022 08:22:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date; bh=tLO7N2dis8tNnLB9AkwaPYLTWEqQ72j3wmpqe0wb6Pw=; b=P2HQ1k41GpXYR5UNzHI81EKPtXG87e4ReDPPexVmAVvl2c+4jUgSXcNlkyRIVT7bXZ xrnZLRgEutEarPcLNawboVoaWQpyM/FerT8JTdZNwlkTlXYNYFxjonDlL/YsXWvA+5Sc fCBLMgOG3x1gv/xESO0R8iRo2pYglDsTB+hzGJktUFKfjx1uVMk7djRLC3C043s8pICn uGEWbVXgqDtqp+IFqaFCMAptNnbX7czTxWxnW9Lpq8KMs8lZKyREWIONRiW0e8w0VlT9 vawZs0KFlAFzhenMGsdohRhWKgQRkJIWTP1UY0OK/UBrYHkI0KO7wQpnRUpMN5USHU2X R/pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date; bh=tLO7N2dis8tNnLB9AkwaPYLTWEqQ72j3wmpqe0wb6Pw=; b=o9/mQHdMIlf+0tJXAm28vzGvUwBOxyJtNxBfmBejC93yXMWjHXxJZEL61FK6upO4TO sm3D9fTwiH1NAyFoyKd6vCTg6kLBlumKOydjB6Sxt8GM8DZeEIRo6e4rJVes/NAgME1W OARM1hMiHX2+9ZQYZUZScjETuzQRJtTAdHefNcc29TFlcsN/uuINaYhJ5RDPTF3IXMFZ FcsiCWEhSp8noFk/TYY5mTO/VYPKcGkkMF5tJ4GLHOZRhOBoUvjKAqP1HD8FlXrXzYzk ddHZHXKkZRnZUWU2FCO0KMxJesviRylCyF3JdpdbBs+PbLQhNthO5DDgn/QRDma6S85h +69A== X-Gm-Message-State: ACgBeo2OOitXp0eVmsG+kV7f5zDP/6stdfvR9zABkOlvQY/N/klIaXrp WSL4nTi0OcXmkZE1jN/MhWAWnpM2dJlJSUlFRgGl1QVjFJU= X-Google-Smtp-Source: AA6agR5yVt8Xx3NuyCBAh5xzmHGwfOwQzY5Unv41RJzEnUKNDkl17UmkIHyPbWlt9F3yjZW1ESaC+0VLmDOHMGhEbgk= X-Received: by 2002:a25:2743:0:b0:6ab:e166:6289 with SMTP id n64-20020a252743000000b006abe1666289mr30377038ybn.234.1663168927331; Wed, 14 Sep 2022 08:22:07 -0700 (PDT) MIME-Version: 1.0 References: <20220903092144.569716-1-mvanb1@gmail.com> <20220903092144.569716-2-mvanb1@gmail.com> In-Reply-To: From: Martijn van Beurden Date: Wed, 14 Sep 2022 17:21:54 +0200 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH v4 1/2] libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM 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: Op wo 14 sep. 2022 om 15:03 schreef Andreas Rheinhardt < andreas.rheinhardt@outlook.com>: > > --- a/libavcodec/flacdec.c > > +++ b/libavcodec/flacdec.c > > @@ -64,6 +64,9 @@ typedef struct FLACContext { > > int32_t *decoded[FLAC_MAX_CHANNELS]; ///< decoded samples > > uint8_t *decoded_buffer; > > unsigned int decoded_buffer_size; > > + int64_t *decoded_33bps; ///< decoded samples for a > 33 bps subframe > > + uint8_t *decoded_buffer_33bps; > > Why do you need a new buffer here instead of just reusing decoded_buffer? > > I don't follow, do you mean I could have decoded_33bps use decoded_buffer too? Wouldn't that kind of aliasing lead to problems? > > + av_fast_malloc(&s->decoded_buffer_33bps, > &s->decoded_buffer_size_33bps, buf_size); > > + if (!s->decoded_buffer) > > You are checking the wrong variable. > > I'll fix that, thanks! _______________________________________________ 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".