changeset 29448:80c6dd85f7f8

Parse BitsPerSample and SamplesPerSec when playing PCM in X-QT over RTSP.
author cehoyos
date Tue, 11 Aug 2009 18:07:43 +0000
parents db248c87f4cf
children 290afe64ba96
files libmpdemux/demux_rtp_codec.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rtp_codec.cpp	Tue Aug 11 17:56:19 2009 +0000
+++ b/libmpdemux/demux_rtp_codec.cpp	Tue Aug 11 18:07:43 2009 +0000
@@ -317,6 +317,10 @@
     wf->wFormatTag = sh_audio->format = fourcc;
     wf->nChannels = numChannels;
 
+      if (qtRTPSource->qtState.sdAtomSize > 33) {
+        wf->wBitsPerSample = qtRTPSource->qtState.sdAtom[27];
+        wf->nSamplesPerSec = qtRTPSource->qtState.sdAtom[32]<<8|qtRTPSource->qtState.sdAtom[33];
+      }
     uint8_t *pos = (uint8_t*)qtRTPSource->qtState.sdAtom + 52;
     uint8_t *endpos = (uint8_t*)qtRTPSource->qtState.sdAtom
                       + qtRTPSource->qtState.sdAtomSize;