Lines Matching defs:ofmt_ctx
40 static AVFormatContext *ofmt_ctx;
130 ofmt_ctx = NULL;
131 avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, filename);
132 if (!ofmt_ctx) {
139 out_stream = avformat_new_stream(ofmt_ctx, NULL);
186 if (ofmt_ctx->oformat->flags & AVFMT_GLOBALHEADER)
217 av_dump_format(ofmt_ctx, 0, filename, 1);
219 if (!(ofmt_ctx->oformat->flags & AVFMT_NOFILE)) {
220 ret = avio_open(&ofmt_ctx->pb, filename, AVIO_FLAG_WRITE);
228 ret = avformat_write_header(ofmt_ctx, NULL);
452 ofmt_ctx->streams[stream_index]->time_base);
456 ret = av_interleaved_write_frame(ofmt_ctx, enc_pkt);
570 ofmt_ctx->streams[stream_index]->time_base);
572 ret = av_interleaved_write_frame(ofmt_ctx, packet);
598 av_write_trailer(ofmt_ctx);
603 if (ofmt_ctx && ofmt_ctx->nb_streams > i && ofmt_ctx->streams[i] && stream_ctx[i].enc_ctx)
616 if (ofmt_ctx && !(ofmt_ctx->oformat->flags & AVFMT_NOFILE))
617 avio_closep(&ofmt_ctx->pb);
618 avformat_free_context(ofmt_ctx);