From 0c378ea1f76e226eff460c84634e7227e3705372 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Fri, 23 Sep 2011 15:47:56 -0400 Subject: rtp: factorize dynamic payload type fallback Move the identical code in rtp_write_header() and ff_sdp_write_media() inside ff_rtp_get_payload_type() Signed-off-by: Luca Barbato --- libavformat/sdp.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'libavformat/sdp.c') diff --git a/libavformat/sdp.c b/libavformat/sdp.c index c227c7f603..f27a89936c 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -533,9 +533,6 @@ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *des int payload_type; payload_type = ff_rtp_get_payload_type(c); - if (payload_type < 0) { - payload_type = RTP_PT_PRIVATE + (c->codec_type == AVMEDIA_TYPE_AUDIO); - } switch (c->codec_type) { case AVMEDIA_TYPE_VIDEO : type = "video" ; break; -- cgit v1.2.3