[FFmpeg-devel] [PATCH] avformat/aacdec: enable probesize-sized resyncs mid-file

Jan Ekström jeebjp at gmail.com
Tue Sep 28 01:40:28 EEST 2021


On Tue, Sep 28, 2021 at 1:34 AM James Almer <jamrial at gmail.com> wrote:
>
> On 9/27/2021 6:31 PM, Jan Ekström wrote:
> > Before adts_aac_resync would always bail out after probesize amount
> > of bytes had been progressed from the start of the input.
> >
> > Add an argument for the start position, and set it to zero when
> > reading the header (which should happen in the beginning) to mimic
> > previous behavior of going only up to probesize. Then, when doing
> > a resync mid-file when reading a packet, pass the current position
> > in stream to the function.
>
> There's no need to keep the probesize limit from start of stream
> hardcoded in adts_aac_read_header(). Your solution in
> http://up-cat.net/p/e046e8f7 is IMO simpler. It will ensure any call to
> adts_aac_resync() will read only up to probesize bytes from the current
> position of the stream.
>

Alright. I thought that was done for a reason and thus tried to
emulate it, but yes - I did like my initial version's simplicity as
well.

Will post a v2 with that.

Jan


More information about the ffmpeg-devel mailing list