From: Dmitry Samonenko <[email protected]>

This packetization scheme simply places the full packets into the
RTP packet without any extra header bytes.
---
 libavformat/rtpenc.c |    1 +
 libavformat/sdp.c    |    4 ++++
 2 files changed, 5 insertions(+)

diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index eab7654..22af898 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -75,6 +75,7 @@ static int is_supported(enum AVCodecID id)
     case AV_CODEC_ID_ADPCM_G722:
     case AV_CODEC_ID_ADPCM_G726:
     case AV_CODEC_ID_ILBC:
+    case AV_CODEC_ID_SPEEX:
         return 1;
     default:
         return 0;
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 9bb4815..2a6c2d2 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -567,6 +567,10 @@ static char *sdp_write_media_attributes(char *buff, int 
size, AVCodecContext *c,
                                      payload_type, c->sample_rate,
                                      payload_type, c->block_align == 38 ? 20 : 
30);
             break;
+        case AV_CODEC_ID_SPEEX:
+            av_strlcatf(buff, size, "a=rtpmap:%d speex/%d\r\n",
+                                     payload_type, c->sample_rate);
+            break;
         default:
             /* Nothing special to do here... */
             break;
-- 
1.7.9.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to