]> git.sesse.net Git - ffmpeg/commitdiff
Use different dynamic payload types for audio and video.
authorLuca Abeni <lucabe72@email.it>
Sun, 27 Dec 2009 21:31:10 +0000 (21:31 +0000)
committerLuca Abeni <lucabe72@email.it>
Sun, 27 Dec 2009 21:31:10 +0000 (21:31 +0000)
Originally committed as revision 20940 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/rtpenc.c
libavformat/sdp.c

index 2a0770e300da87e8a6d6c0f113f3625f139ad71c..91b9c05f33dacf67ce499667b697921ea55509f2 100644 (file)
@@ -85,7 +85,7 @@ static int rtp_write_header(AVFormatContext *s1)
 
     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
index 0a286417e115a3bcbfd322b0267d616e32ffdbb9..2d425725897fc85fe7589e458cb2f177d3d490da 100644 (file)
@@ -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);
     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) {