diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 14:31:13 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-15 14:31:13 +0400 |
commit | a9b1536a018b867e3458a278c2992f7cd2fb707d (patch) | |
tree | 55556d53044f7e8854f59c9eb7fcab76f3ea19d1 /libavformat/rtp.c | |
parent | 4d941eac1655b21af33c6e4d52b7bfd7f9e5b990 (diff) | |
parent | b74dbdd5e99aed7f3bf1ecb5da1b374e5ba35768 (diff) |
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/rtp.c')
-rw-r--r-- | libavformat/rtp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/rtp.c b/libavformat/rtp.c index f9e444746a..ae0fd58ace 100644 --- a/libavformat/rtp.c +++ b/libavformat/rtp.c @@ -90,7 +90,8 @@ int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type) return -1; } -int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec) +int ff_rtp_get_payload_type(AVFormatContext *fmt, + AVCodecContext *codec, int idx) { int i; AVOutputFormat *ofmt = fmt ? fmt->oformat : NULL; @@ -124,8 +125,11 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec) return AVRtpPayloadTypes[i].pt; } + if (idx < 0) + idx = codec->codec_type == AVMEDIA_TYPE_AUDIO; + /* dynamic payload type */ - return RTP_PT_PRIVATE + (codec->codec_type == AVMEDIA_TYPE_AUDIO); + return RTP_PT_PRIVATE + idx; } const char *ff_rtp_enc_name(int payload_type) |