summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_rtp_codec.cpp
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-06 22:53:52 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-06 22:53:52 +0000
commitf1c7edfaa6d5fd616b786224bc6f92eeee2e7e1e (patch)
treec520759404596a39d137c8c0950d2cddd1d841a5 /libmpdemux/demux_rtp_codec.cpp
parent5de53fffeb5a6cf52a5595c082355ba06724e04f (diff)
downloadmpv-f1c7edfaa6d5fd616b786224bc6f92eeee2e7e1e.tar.bz2
mpv-f1c7edfaa6d5fd616b786224bc6f92eeee2e7e1e.tar.xz
support for AMR; it works inserting in the first byte of the demux_packet
a 1-byte header that live555 seems to be stripping for some reason, although according to the specs it should be there. Patch by Carl Eugen Hoyos. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22481 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_rtp_codec.cpp')
-rw-r--r--libmpdemux/demux_rtp_codec.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmpdemux/demux_rtp_codec.cpp b/libmpdemux/demux_rtp_codec.cpp
index 9d45fff92d..a551334422 100644
--- a/libmpdemux/demux_rtp_codec.cpp
+++ b/libmpdemux/demux_rtp_codec.cpp
@@ -184,6 +184,10 @@ void rtpCodecInitialize_audio(demuxer_t* demuxer,
wf->nBlockAlign = 1;
wf->wBitsPerSample = 8;
wf->cbSize = 0;
+ } else if (strcmp(subsession->codecName(), "AMR") == 0) {
+ wf->wFormatTag = sh_audio->format = mmioFOURCC('s','a','m','r');
+ } else if (strcmp(subsession->codecName(), "AMR-WB") == 0) {
+ wf->wFormatTag = sh_audio->format = mmioFOURCC('s','a','w','b');
} else if (strcmp(subsession->codecName(), "GSM") == 0) {
wf->wFormatTag = sh_audio->format = mmioFOURCC('a','g','s','m');
wf->nAvgBytesPerSec = 1650;