From 0048a2a8d347c9a81a781f4126023018f1b29527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 15 Sep 2010 17:35:39 +0000 Subject: 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 --- libavformat/rtpdec.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libavformat/rtpdec.c') diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index debc14c..942b8d7 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); -- cgit v1.1