Merge commit '4a4a7e138c92901e04db46a6b05cc6948023e5f5'

* commit '4a4a7e138c92901e04db46a6b05cc6948023e5f5':
  rtpenc_chain: Use the original AVFormatContext for getting payload type
  rtp: Make sure the output format pointer is set

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-24 14:18:25 +01:00
commit b4581e9394
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt,
/* static payload type */
for (i = 0; rtp_payload_types[i].pt >= 0; ++i)
if (rtp_payload_types[i].codec_id == codec->codec_id) {
if (codec->codec_id == AV_CODEC_ID_H263 && (!fmt ||
if (codec->codec_id == AV_CODEC_ID_H263 && (!fmt || !fmt->oformat ||
!fmt->oformat->priv_class || !fmt->priv_data ||
!av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))
continue;

View File

@ -64,7 +64,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
/* Get the payload type from the codec */
if (st->id < RTP_PT_PRIVATE)
rtpctx->streams[0]->id =
ff_rtp_get_payload_type(rtpctx, st->codec, idx);
ff_rtp_get_payload_type(s, st->codec, idx);
else
rtpctx->streams[0]->id = st->id;