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

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


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

live555 : fix quicktime audio codec settings.
(cherry picked from commit 52d209b83b69cd0a0576a41976b3d8d8926178eb)

Signed-off-by: Sébastien Escudier <sebastien-devel at celeos.eu>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=93aaf6cf1b18344eb0f10c3ce6335b9e58b79747
---

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

diff --git a/NEWS b/NEWS
index 5736848..099be5a 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Access:
 Codecs:
  * Support for MXPEG files
  * limit auto-detected threads to 4 in avcodec module
+ * fix quicktime audio codecs in RTSP streams
 
 Demuxers:
  * Fix multi-file splitted RAR archive support
diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp
index ed67d8b..0c24344 100644
--- a/modules/demux/live555.cpp
+++ b/modules/demux/live555.cpp
@@ -1737,6 +1737,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 )
             {
@@ -1777,7 +1779,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;
@@ -1785,6 +1787,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