diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 11:31:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 11:31:13 +0100 |
commit | a9b1536a018b867e3458a278c2992f7cd2fb707d (patch) | |
tree | 55556d53044f7e8854f59c9eb7fcab76f3ea19d1 /libavformat/rtpenc.c | |
parent | 4d941eac1655b21af33c6e4d52b7bfd7f9e5b990 (diff) | |
parent | b74dbdd5e99aed7f3bf1ecb5da1b374e5ba35768 (diff) | |
download | ffmpeg-a9b1536a018b867e3458a278c2992f7cd2fb707d.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
bgmc: Fix av_malloc checks in ff_bgmc_init()
rtp: set the payload type as stream id
Conflicts:
libavformat/rtpenc_chain.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpenc.c')
-rw-r--r-- | libavformat/rtpenc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index 3a5bbeb398..0010a92e2d 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -101,8 +101,17 @@ static int rtp_write_header(AVFormatContext *s1) return -1; } - if (s->payload_type < 0) - s->payload_type = ff_rtp_get_payload_type(s1, st->codec); + if (s->payload_type < 0) { + /* Re-validate non-dynamic payload types */ + if (st->id < RTP_PT_PRIVATE) + st->id = ff_rtp_get_payload_type(s1, st->codec, -1); + + s->payload_type = st->id; + } else { + /* private option takes priority */ + st->id = s->payload_type; + } + s->base_timestamp = av_get_random_seed(); s->timestamp = s->base_timestamp; s->cur_timestamp = 0; |