Mercurial > libavformat.hg
diff rtpdec.c @ 6476:f06908662125 libavformat
Handle G.722 in RTP, and all the exceptions mandated in RFC 3551
author | mstorsjo |
---|---|
date | Wed, 15 Sep 2010 17:35:39 +0000 |
parents | 2685bf2b0b78 |
children |
line wrap: on
line diff
--- a/rtpdec.c Tue Sep 14 22:20:46 2010 +0000 +++ b/rtpdec.c Wed Sep 15 17:35:39 2010 +0000 @@ -365,6 +365,13 @@ 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);