memset(&hints, 0, sizeof(hints));
if (getaddrinfo(dest_addr, NULL, &hints, &ai))
return;
- getnameinfo(ai->ai_addr, ai->ai_addrlen, dest_addr, size,
- NULL, 0, NI_NUMERICHOST);
- if (ai->ai_family == AF_INET6)
- av_strlcpy(type, "IP6", type_size);
+ getnameinfo(ai->ai_addr, ai->ai_addrlen, dest_addr, size,
+ NULL, 0, NI_NUMERICHOST);
+ if (ai->ai_family == AF_INET6)
+ av_strlcpy(type, "IP6", type_size);
freeaddrinfo(ai);
}
#else
av_strlcatf(buff, size, "a=rtpmap:%d VP8/90000\r\n",
payload_type);
break;
+ case CODEC_ID_ADPCM_G722:
+ if (payload_type >= RTP_PT_PRIVATE)
+ av_strlcatf(buff, size, "a=rtpmap:%d G722/%d/%d\r\n",
+ payload_type,
+ 8000, c->channels);
+ break;
default:
/* Nothing special to do here... */
break;
return AVERROR(ENOSYS);
}
-void ff_sdp_write_media(char *buff, int size, AVCodecContext *c,
- const char *dest_addr, int port, int ttl)
+void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl)
{
}
#endif