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>
This commit is contained in:
Michael Niedermayer
2012-11-15 11:31:13 +01:00
12 changed files with 68 additions and 26 deletions

View File

@@ -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)