changeset 5476:770a7de45356 libavformat

Use different dynamic payload types for audio and video.
author lucabe
date Sun, 27 Dec 2009 21:31:10 +0000
parents c47a84f46ae2
children 2ba624c6c869
files rtpenc.c sdp.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rtpenc.c	Sun Dec 27 08:21:40 2009 +0000
+++ b/rtpenc.c	Sun Dec 27 21:31:10 2009 +0000
@@ -85,7 +85,7 @@
 
     payload_type = ff_rtp_get_payload_type(st->codec);
     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;
 
 // following 2 FIXMEs could be set based on the current time, there is normally no info leak, as RTP will likely be transmitted immediately
--- a/sdp.c	Sun Dec 27 08:21:40 2009 +0000
+++ b/sdp.c	Sun Dec 27 21:31:10 2009 +0000
@@ -257,7 +257,7 @@
 
     payload_type = ff_rtp_get_payload_type(c);
     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) {