[FFmpeg-devel] [PATCH] latm: fix initialization on some streams when no extradata is available

Hendrik Leppkes h.leppkes at gmail.com
Thu Jun 21 11:57:59 CEST 2012


On Thu, Jun 21, 2012 at 11:48 AM, Reimar Döffinger <Reimar.Doeffinger at gmx.de
> wrote:

>
> Shouldn't rather all the stuff be set up in the init function?
>

The problem starts when there is not enough information for the init
function to work completely, and instead the full configuration is only
available when the first latm frame is decoded.
Most of the time, i know sample rate and channels before opening the codec,
so i set them on the AVCodecContext, and the aac init function sets them on
its internal context, but the full latm initialization is not done because
there is no extradata. Now when the first frame is decoded, the existing
checks don't catch because sample rate and channel config did not change,
but the full latm init is still missing.

I'm open to other ideas to solve the problem, but i usually prefer rather
simple changes, even if it means that one log message comes out wrong. ;)

- Hendrik


More information about the ffmpeg-devel mailing list