Commit b4581e93 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '4a4a7e13'

* commit '4a4a7e13':
  rtpenc_chain: Use the original AVFormatContext for getting payload type
  rtp: Make sure the output format pointer is set
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 1d2abca7 4a4a7e13
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment