[FFmpeg-devel] [RFC PATCH 1/3] aacdec: always skip the first 2048 samples if there's no side data

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Sep 12 10:10:57 EEST 2023


Lynne:
> For some reason, this was never set, which meant all **raw** AAC in ADTS
> streams, except faac, had extra samples at the start.
> 
> Despite this being a standard MDCT-based codec with a frame size of 1024,
> hence a delay of 1024 samples at the start, all major encoders, excluding
> faac and FFmpeg, use 2048 samples of padding.
> 
> The FFmpeg encoder will be modified to also output 2048 samples of padding
> at the start, to make it in line with other encoders.

Does this also have actual advantages besides "being in line with other
encoders"?

> 
> Yes, this leaves FATE pretty sad. Will fix it with the real version of the patch.
> 

Didn't we once guess the number of skip samples like this, only for this
guesswork to be removed intentionally? (This is not a rhetorical
question; I thought it to be true, but I see that there is still code
for faac in decode_fill(); maybe I misremember.)

- Andreas



More information about the ffmpeg-devel mailing list