summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-09-15 17:35:39 +0000
committerMartin Storsjö <martin@martin.st>2010-09-15 17:35:39 +0000
commit0048a2a8d347c9a81a781f4126023018f1b29527 (patch)
treeeb9e71c1e3edaa6eface988067c0fac44bd5656b /libavformat/rtpdec.c
parent82eac2f3216534c065c5023e5599720bd17bed26 (diff)
Handle G.722 in RTP, and all the exceptions mandated in RFC 3551
Originally committed as revision 25125 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r--libavformat/rtpdec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index debc14c90b..942b8d71c8 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -365,6 +365,13 @@ RTPDemuxContext *rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *r
case CODEC_ID_H264:
st->need_parsing = AVSTREAM_PARSE_FULL;
break;
+ case CODEC_ID_ADPCM_G722:
+ av_set_pts_info(st, 32, 1, st->codec->sample_rate);
+ /* According to RFC 3551, the stream clock rate is 8000
+ * even if the sample rate is 16000. */
+ if (st->codec->sample_rate == 8000)
+ st->codec->sample_rate = 16000;
+ break;
default:
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
av_set_pts_info(st, 32, 1, st->codec->sample_rate);