[FFmpeg-devel] [PATCH] aacenc: update max_sfb when num_swb changes

Rostislav Pehlivanov atomnuker at gmail.com
Tue Dec 8 22:00:45 CET 2015


LGTM

Thanks, sorry I took so long to see the email
Push when you can

On 6 December 2015 at 21:33, Andreas Cadhalpun <
andreas.cadhalpun at googlemail.com> wrote:

> This fixes out-of-bounds reads in avoid_clipping.
>
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
>  libavcodec/aacenc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
> index 2156fc0..d48fb32 100644
> --- a/libavcodec/aacenc.c
> +++ b/libavcodec/aacenc.c
> @@ -574,6 +574,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
> AVPacket *avpkt,
>              ics->num_windows        = wi[ch].num_windows;
>              ics->swb_sizes          = s->psy.bands    [ics->num_windows
> == 8];
>              ics->num_swb            = tag == TYPE_LFE ? ics->num_swb :
> s->psy.num_bands[ics->num_windows == 8];
> +            ics->max_sfb            = FFMIN(ics->max_sfb, ics->num_swb);
>              ics->swb_offset         = wi[ch].window_type[0] ==
> EIGHT_SHORT_SEQUENCE ?
>                                          ff_swb_offset_128
> [s->samplerate_index]:
>
>  ff_swb_offset_1024[s->samplerate_index];
> --
> 2.6.2
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list