Commit f877954f authored by Luca Abeni's avatar Luca Abeni

Use RTP_PT_PRIVATE in sdp.c instead of hardcoding 96.

Originally committed as revision 20922 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 37ce3d6b
...@@ -211,19 +211,19 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, ...@@ -211,19 +211,19 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
payload_type, config); payload_type, config);
break; break;
case CODEC_ID_PCM_S16BE: case CODEC_ID_PCM_S16BE:
if (payload_type >= 96) if (payload_type >= RTP_PT_PRIVATE)
av_strlcatf(buff, size, "a=rtpmap:%d L16/%d/%d\r\n", av_strlcatf(buff, size, "a=rtpmap:%d L16/%d/%d\r\n",
payload_type, payload_type,
c->sample_rate, c->channels); c->sample_rate, c->channels);
break; break;
case CODEC_ID_PCM_MULAW: case CODEC_ID_PCM_MULAW:
if (payload_type >= 96) if (payload_type >= RTP_PT_PRIVATE)
av_strlcatf(buff, size, "a=rtpmap:%d PCMU/%d/%d\r\n", av_strlcatf(buff, size, "a=rtpmap:%d PCMU/%d/%d\r\n",
payload_type, payload_type,
c->sample_rate, c->channels); c->sample_rate, c->channels);
break; break;
case CODEC_ID_PCM_ALAW: case CODEC_ID_PCM_ALAW:
if (payload_type >= 96) if (payload_type >= RTP_PT_PRIVATE)
av_strlcatf(buff, size, "a=rtpmap:%d PCMA/%d/%d\r\n", av_strlcatf(buff, size, "a=rtpmap:%d PCMA/%d/%d\r\n",
payload_type, payload_type,
c->sample_rate, c->channels); c->sample_rate, c->channels);
...@@ -257,7 +257,7 @@ static void sdp_write_media(char *buff, int size, AVCodecContext *c, const char ...@@ -257,7 +257,7 @@ static void sdp_write_media(char *buff, int size, AVCodecContext *c, const char
payload_type = ff_rtp_get_payload_type(c); payload_type = ff_rtp_get_payload_type(c);
if (payload_type < 0) { if (payload_type < 0) {
payload_type = 96; /* FIXME: how to assign a private pt? rtp.c is broken too */ payload_type = RTP_PT_PRIVATE; /* FIXME: how to assign a private pt? rtp.c is broken too */
} }
switch (c->codec_type) { switch (c->codec_type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment