Commit 93aaf6cf authored by Sébastien Escudier's avatar Sébastien Escudier

live555 : fix quicktime audio codec settings.

(cherry picked from commit 52d209b83b69cd0a0576a41976b3d8d8926178eb)
Signed-off-by: default avatarSébastien Escudier <sebastien-devel@celeos.eu>
parent 34089319
......@@ -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
......
......@@ -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 );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment