rtp: Support packetization/depacketization of opus
[ffmpeg.git] / libavformat / rtpdec.c
index 0f4e1d1d86a788aaaaf44ca4e75124999b822106..dac367dd86097d5f39020883b82929fcf7e72e3b 100644 (file)
@@ -55,6 +55,12 @@ static RTPDynamicProtocolHandler speex_dynamic_handler = {
     .codec_id         = AV_CODEC_ID_SPEEX,
 };
 
+static RTPDynamicProtocolHandler opus_dynamic_handler = {
+    .enc_name         = "opus",
+    .codec_type       = AVMEDIA_TYPE_AUDIO,
+    .codec_id         = AV_CODEC_ID_OPUS,
+};
+
 /* statistics functions */
 static RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler= NULL;
 
@@ -85,6 +91,7 @@ void av_register_rtp_dynamic_payload_handlers(void)
     ff_register_dynamic_payload_handler(&ff_qcelp_dynamic_handler);
     ff_register_dynamic_payload_handler(&realmedia_mp3_dynamic_handler);
     ff_register_dynamic_payload_handler(&speex_dynamic_handler);
+    ff_register_dynamic_payload_handler(&opus_dynamic_handler);
 
     ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfv_handler);
     ff_register_dynamic_payload_handler(&ff_ms_rtp_asf_pfa_handler);