Lines Matching refs:rtpctx
32 AVFormatContext *rtpctx = NULL; in ff_rtp_chain_mux_open() local
44 rtpctx = avformat_alloc_context(); in ff_rtp_chain_mux_open()
45 if (!rtpctx) { in ff_rtp_chain_mux_open()
50 rtpctx->oformat = rtp_format; in ff_rtp_chain_mux_open()
51 if (!avformat_new_stream(rtpctx, NULL)) { in ff_rtp_chain_mux_open()
56 rtpctx->interrupt_callback = s->interrupt_callback; in ff_rtp_chain_mux_open()
58 rtpctx->max_delay = s->max_delay; in ff_rtp_chain_mux_open()
60 rtpctx->streams[0]->sample_aspect_ratio = st->sample_aspect_ratio; in ff_rtp_chain_mux_open()
61 rtpctx->flags |= s->flags & AVFMT_FLAG_BITEXACT; in ff_rtp_chain_mux_open()
62 rtpctx->strict_std_compliance = s->strict_std_compliance; in ff_rtp_chain_mux_open()
66 rtpctx->streams[0]->id = in ff_rtp_chain_mux_open()
69 rtpctx->streams[0]->id = st->id; in ff_rtp_chain_mux_open()
76 rtpctx->start_time_realtime = s->start_time_realtime; in ff_rtp_chain_mux_open()
78 avcodec_parameters_copy(rtpctx->streams[0]->codecpar, st->codecpar); in ff_rtp_chain_mux_open()
79 rtpctx->streams[0]->time_base = st->time_base; in ff_rtp_chain_mux_open()
82 ret = ffio_fdopen(&rtpctx->pb, handle); in ff_rtp_chain_mux_open()
86 ret = ffio_open_dyn_packet_buf(&rtpctx->pb, packet_size); in ff_rtp_chain_mux_open()
88 ret = avformat_write_header(rtpctx, &opts); in ff_rtp_chain_mux_open()
92 if (handle && rtpctx->pb) { in ff_rtp_chain_mux_open()
93 avio_closep(&rtpctx->pb); in ff_rtp_chain_mux_open()
94 } else if (rtpctx->pb) { in ff_rtp_chain_mux_open()
95 ffio_free_dyn_buf(&rtpctx->pb); in ff_rtp_chain_mux_open()
97 avformat_free_context(rtpctx); in ff_rtp_chain_mux_open()
101 *out = rtpctx; in ff_rtp_chain_mux_open()
105 avformat_free_context(rtpctx); in ff_rtp_chain_mux_open()