]> git.sesse.net Git - ffmpeg/commitdiff
Add initial support for speex RTP packetization (RFC 5574)
authorDmitry Samonenko <shreddingwork@gmail.com>
Sat, 22 Sep 2012 10:32:37 +0000 (14:32 +0400)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 23 Sep 2012 12:08:48 +0000 (14:08 +0200)
* libspeex audio codec is no longer considered unsupported
  when using rtp as output format.
* SDP rtpmap is added for speex payload, formatted according to RFC

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rtpenc.c
libavformat/sdp.c

index dc905e6ac163646eec6bef41fe13b74ef9a53d40..3a3e3d8ee2812a7af9e8e5e2f024d2b013a4dffa 100644 (file)
@@ -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;
index 9d7dc0be0d88eccf6ab5252e2cfe6343f2308206..8ff43258172286886e8e5c5c18317e6795f20f6e 100644 (file)
@@ -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);
+
         default:
             /* Nothing special to do here... */
             break;