Commit 4298e44b authored by lucabe's avatar lucabe

Use different dynamic payload types for audio and video.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20940 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cc7a42e5
...@@ -85,7 +85,7 @@ static int rtp_write_header(AVFormatContext *s1) ...@@ -85,7 +85,7 @@ static int rtp_write_header(AVFormatContext *s1)
payload_type = ff_rtp_get_payload_type(st->codec); payload_type = ff_rtp_get_payload_type(st->codec);
if (payload_type < 0) if (payload_type < 0)
payload_type = RTP_PT_PRIVATE; /* private payload type */ payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == CODEC_TYPE_AUDIO);
s->payload_type = payload_type; s->payload_type = payload_type;
// following 2 FIXMEs could be set based on the current time, there is normally no info leak, as RTP will likely be transmitted immediately // following 2 FIXMEs could be set based on the current time, there is normally no info leak, as RTP will likely be transmitted immediately
......
...@@ -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 = RTP_PT_PRIVATE; /* FIXME: how to assign a private pt? rtp.c is broken too */ payload_type = RTP_PT_PRIVATE + (c->codec_type == CODEC_TYPE_AUDIO);
} }
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