summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-10-24 23:03:02 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-10-29 15:30:02 +0100
commit75bd01090f5b93eb1d2b4543d1c01031281879a4 (patch)
tree566fd84f6fe51d8a73e8411c1edd96964527be83 /libavformat/rtpenc.c
parente9930883a26c77261c19ea9ad9b930b065c6f579 (diff)
downloadffmpeg-75bd01090f5b93eb1d2b4543d1c01031281879a4.tar.gz
lavf/rtpenc: Add support for 24 bit pcm encoding as defined by RFC 3190.
Fixes ticket #6770.
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r--libavformat/rtpenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index 573593fa66..63047beccc 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -66,6 +66,7 @@ static int is_supported(enum AVCodecID id)
case AV_CODEC_ID_PCM_S8:
case AV_CODEC_ID_PCM_S16BE:
case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S24BE:
case AV_CODEC_ID_PCM_U16BE:
case AV_CODEC_ID_PCM_U16LE:
case AV_CODEC_ID_PCM_U8:
@@ -544,6 +545,8 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
case AV_CODEC_ID_PCM_S16BE:
case AV_CODEC_ID_PCM_S16LE:
return rtp_send_samples(s1, pkt->data, size, 16 * st->codecpar->channels);
+ case AV_CODEC_ID_PCM_S24BE:
+ return rtp_send_samples(s1, pkt->data, size, 24 * st->codecpar->channels);
case AV_CODEC_ID_ADPCM_G722:
/* The actual sample size is half a byte per sample, but since the
* stream clock rate is 8000 Hz while the sample rate is 16000 Hz,