[FFmpeg-devel] [PATCH v4 1/2] libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM
Paul B Mahol
onemda at gmail.com
Wed Sep 14 18:48:12 EEST 2022
On 9/14/22, Martijn van Beurden <mvanb1 at gmail.com> wrote:
> Op wo 14 sep. 2022 om 15:03 schreef Andreas Rheinhardt <
> andreas.rheinhardt at 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?
What kind of aliasing?
>
>
>> > + 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 at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list