diff options
author | Rafaël Carré <rafael.carre@savoirfairelinux.com> | 2011-09-23 15:47:56 -0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2011-09-23 22:00:24 +0200 |
commit | 0c378ea1f76e226eff460c84634e7227e3705372 (patch) | |
tree | 312898a1f9dccd4248e7156a30aeca45b5030f44 /libavformat/rtpenc.c | |
parent | bafff1668c6bc4d1cb3b7e4b9dac85b8b52e4765 (diff) | |
download | ffmpeg-0c378ea1f76e226eff460c84634e7227e3705372.tar.gz |
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 <lu_zero@gentoo.org>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r-- | libavformat/rtpenc.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index ef261c3022..1f5d9ba37a 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -93,9 +93,6 @@ static int rtp_write_header(AVFormatContext *s1) } s->payload_type = ff_rtp_get_payload_type(st->codec); - if (s->payload_type < 0) - s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == AVMEDIA_TYPE_AUDIO); - s->base_timestamp = av_get_random_seed(); s->timestamp = s->base_timestamp; s->cur_timestamp = 0; |