[vlc-devel] Re: [vlc] Playing 3GPP Audio Only LATM AAC/HE-AAC Streams

Ross Finlayson finlayson at live555.com
Fri Mar 3 03:44:55 CET 2006

FYI, I have now found and fixed this problem.

The problem was caused by the fact that the "faad" decoder - unlike 
other AAC decoders - does not handle the 'LATM frame size' field 
that's at the start of each LATM-format AAC audio frame.  I fixed the 
problem by (i) updating the "LIVE555 Streaming Media" libraries to 
support (optionally) omitting this field on incoming frames from 
LATM/RTP streams, and (ii) updating VLC's "livedotcom.cpp" file to 
tell the LIVE555 code to omit this field.

The attached patch to "livedotcom.cpp" will fix the problem.  Note 
that, to work, it requires the use of version 2006.03.03 or later of 
the "LIVE555 Streaming Media" code.

With this fix, VLC will successfully play all of Greg Ogonowski's 
streams: AAC or AAC+, one frame per packet or multiple frames per packet.


ps. At some point, the VLC developers should rename the file 
"livedotcom.cpp" to "live555.cpp".  The domain name "live.com" is now 
owned by Microsoft, and we should not be misleading people into 
thinking that this code has anything to do with Microsoft's "live.com" stuff.
-------------- next part --------------
--- livedotcom.cpp	Thu Mar  2 17:32:44 2006
+++ livedotcom.cpp.new	Thu Mar  2 17:59:29 2006
@@ -1,5 +1,5 @@
- * livedotcom.cpp : live.com support.
+ * livedotcom.cpp : LIVE555 Streaming Media support.
  * Copyright (C) 2003-2005 the VideoLAN team
  * $Id$
@@ -509,6 +509,12 @@
                     memcpy( tk->fmt.p_extra, p_extra, i_extra );
                     delete[] p_extra;
+		/* Because the "faad" decoder does not handle the LATM data length field
+		   at the start of each returned LATM frame, tell the RTP source to omit it. */
+		((MPEG4LATMAudioRTPSource*)sub->rtpSource())->omitLATMDataLengthField();
             else if( !strcmp( sub->codecName(), "MPEG4-GENERIC" ) )

More information about the vlc-devel mailing list