[FFmpeg-devel] [PATCH] latmenc: remove dead code.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Apr 9 18:31:33 CEST 2012

On Mon, Apr 09, 2012 at 05:06:01PM +0100, Kieran Kunhya wrote:
> > But even giving up on the ALS case issues abound: the number of
> > bits between the position the header parser returns and the pce
> > data can be variable, the code assumes it is always 3 (and
> > even that only after fixing it, otherwise it assumes the pce is
> > at the start of extradata, which is just nonsense).
> >
> > Now after all that is fixed, there is the issue of bitstream
> > modifications, and all I did was hack the userdata stuff to work.
> > The only reason I did that is that testing the muxer is kind of
> > hard when not a single of our FATE samples actually works with it.
> I agree the ALS special case is broken.

Know some way of fixing it or at least some reference file to compare
against (i.e. any ALS-in-LATM file)?

> If you really want to fix the
> dependsOnCoreCoder,
> part, why not add a function in mpeg4audio that gives you the pce
> offset? That said,
> I don't think we allow any of the AOTs that use core coders anyway so
> as far as I'm concerned
> your offset of 3 bits is correct.

Honestly I don't mind it not working for every case.
But fixing stuff doesn't get easier when it's unclear what is just
"optimization" and what is simply buggy.
Besides that would mean even more change since currently they
are parsed outside avpriv_mpeg4audio_get_config.
I will add a two-line comment about the assumptions.

> I guess it's ok to modify the bitstream in latm as long as it's
> explained because latm
> is the only format where the payload is not written byte aligned.

I added a longer code comment.

More information about the ffmpeg-devel mailing list