[vlc-commits] live555 : fix quicktime audio codec settings.

Sébastien Escudier git at videolan.org
Fri Mar 9 08:39:38 CET 2012


vlc | branch: master | Sébastien Escudier <sebastien-devel at celeos.eu> | Fri Mar  9 08:31:05 2012 +0100| [52d209b83b69cd0a0576a41976b3d8d8926178eb] | committer: Sébastien Escudier

live555 : fix quicktime audio codec settings.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=52d209b83b69cd0a0576a41976b3d8d8926178eb
---

 modules/demux/live555.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp
index 28afd33..241b970 100644
--- a/modules/demux/live555.cpp
+++ b/modules/demux/live555.cpp
@@ -1776,6 +1776,8 @@ static void StreamRead( void *p_private, unsigned int i_size,
         QuickTimeGenericRTPSource::QTState &qtState = qtRTPSource->qtState;
         uint8_t *sdAtom = (uint8_t*)&qtState.sdAtom[4];
 
+        /* Get codec informations from the quicktime atoms :
+         * http://developer.apple.com/quicktime/icefloe/dispatch026.html */
         if( tk->fmt.i_cat == VIDEO_ES ) {
             if( qtState.sdAtomSize < 16 + 32 )
             {
@@ -1816,7 +1818,7 @@ static void StreamRead( void *p_private, unsigned int i_size,
             }
         }
         else {
-            if( qtState.sdAtomSize < 4 )
+            if( qtState.sdAtomSize < 24 )
             {
                 /* invalid */
                 p_sys->event_data = 0xff;
@@ -1824,6 +1826,7 @@ static void StreamRead( void *p_private, unsigned int i_size,
                 return;
             }
             tk->fmt.i_codec = VLC_FOURCC(sdAtom[0],sdAtom[1],sdAtom[2],sdAtom[3]);
+            tk->fmt.audio.i_bitspersample = (sdAtom[22] << 8) | sdAtom[23];
         }
         tk->p_es = es_out_Add( p_demux->out, &tk->fmt );
     }



More information about the vlc-commits mailing list