[FFmpeg-cvslog] r20940 - in trunk/libavformat: rtpenc.c sdp.c
lucabe
subversion
Sun Dec 27 22:31:10 CET 2009
Author: lucabe
Date: Sun Dec 27 22:31:10 2009
New Revision: 20940
Log:
Use different dynamic payload types for audio and video.
Modified:
trunk/libavformat/rtpenc.c
trunk/libavformat/sdp.c
Modified: trunk/libavformat/rtpenc.c
==============================================================================
--- trunk/libavformat/rtpenc.c Sun Dec 27 15:40:49 2009 (r20939)
+++ trunk/libavformat/rtpenc.c Sun Dec 27 22:31:10 2009 (r20940)
@@ -85,7 +85,7 @@ static int rtp_write_header(AVFormatCont
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
Modified: trunk/libavformat/sdp.c
==============================================================================
--- trunk/libavformat/sdp.c Sun Dec 27 15:40:49 2009 (r20939)
+++ trunk/libavformat/sdp.c Sun Dec 27 22:31:10 2009 (r20940)
@@ -257,7 +257,7 @@ static void sdp_write_media(char *buff,
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) {
More information about the ffmpeg-cvslog
mailing list