[FFmpeg-devel] [PATCH v4 1/2] libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM
Martijn van Beurden
mvanb1 at gmail.com
Wed Sep 14 18:21:54 EEST 2022
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?
> > + 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!
More information about the ffmpeg-devel
mailing list