[FFmpeg-devel] AAC rtp_parse_packet RFC3640 compliance

Jorge Pedroso jpedroso
Fri Apr 24 18:20:06 CEST 2009


On Apr 24, 2009, at 1:55 PM, Luca Abeni wrote:
[...]
> rtp_parse_mp4_au() works in a funny way, because it does not returns
> AAC frames...
I'm aware of this. What intrigues me is that it doesn't respect that  
number of frames when filling the au_headers array in RTPPayloadData.

> It simply returns an integer number of AAC frames, assuming
> that a "parser" (see libavcodec/aac_ac3_parser.c) will split this in
> frames later.
Are you referring to RTPPayloadData's nb_au_headers? If yes, it isn't  
referred elsewhere in the code.

Moreover, in order to split, how does the parser know the size of each  
individual AAC frame if, from what I said above, that information was  
lost when concatenating each AU-header-size in au_headers[0].size?


> Or... Maybe the problem is that rtp_parse_open() "forgets" to set
> st->need_parsing = AVSTREAM_PARSE_FULL for the AAC case?
> Try setting it, and the problem should be fixed.
Indeed, it does forget. I did tried setting it manually after my  
av_find_stream_info(), but still av_read_frame() gives me nothing that  
resembles a valid AAC frame. I include my tests with the multiple  
approaches attached.

[...]
>> Moreover, av_read_frame documentation seems to me a bit misguiding  
>> when saying:
>>> If the audio frames have a variable size (e.g. MPEG audio), then  
>>> it contains one frame.
>> This is true when reading a 3GP file from disk but false when  
>> reading from the RTP stream.
> Did you try it? My feeling is that this should always be true. If it's
> not, then you found a bug (the parser is not working, or it's not
> correctly invoked... Try setting st->need_parsing as mentioned above).
 From the tests I include attached, I conclude neither the parser nor  
the rtpdec.c functions are working correctly. Waiting for your  
evaluation of my tests.

[...]

Cheers,
Jorge Pedroso

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rtp_parse_packet-tests.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090424/6b8edb7f/attachment.txt>
-------------- next part --------------




More information about the ffmpeg-devel mailing list