[FFmpeg-devel] [PATCH] Add support for packetizing AMR into RTP

Luca Abeni lucabe72
Fri Apr 3 21:42:42 CEST 2009


Hi Michael,

On Fri, 2009-04-03 at 18:40 +0200, Michael Niedermayer wrote:
[...]
> > > > +#define MAX_FRAMES_PER_PACKET (s->max_frames_per_packet ? s->max_frames_per_packet : 12)
> > > > +#define MAX_HEADER_TOC_SIZE (1 + MAX_FRAMES_PER_PACKET)
> > > 
> > > iam against use of #defines to hide non constants unless theres some sense
> > > in it. (i doubt there is here)
> > 
> > Ok, so I should move them into the function, making them const ints?
> 
> thats an option i suspect

Ok; I'll fix it in the AAC packetiser too.


> > > > +        if (s->buf_ptr != s->buf + MAX_HEADER_TOC_SIZE) {
> > > > +            av_log(s1, AV_LOG_ERROR, "Strange...\n");
> > > > +            av_abort();
> > > > +        }
> > > 
> > > you cannot call *abort() in a library in general
> > 
> > This is the same as in rtp_aac.c;
> 
> so its broken too

I'll removed those lines from the AAC packetiser: I am now confident
that the code is working well, and this consistency check is useless (I
should have used assert(), but I used an if() + abort() because I did
not manage to have assert() working - I now know how to control it with
NDEBUG)


			Thanks,
				Luca




More information about the ffmpeg-devel mailing list