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