Lines Matching refs:ctx
103 AVFormatContext *ctx;
451 if (!os->ctx->pb) {
456 av_write_frame(os->ctx, NULL);
457 avio_flush(os->ctx->pb);
461 *range_length = avio_close_dyn_buf(os->ctx->pb, &buffer);
462 os->ctx->pb = NULL;
469 return avio_open_dyn_buf(&os->ctx->pb);
471 *range_length = avio_tell(os->ctx->pb) - os->pos;
511 int timescale = os->ctx->streams[0]->time_base.den;
570 av_log(os->ctx, AV_LOG_WARNING, "ff_hls_write_file_entry get error\n");
583 ff_rename(temp_filename_hls, filename_hls, os->ctx);
622 if (os->ctx && os->ctx->pb) {
624 ffio_free_dyn_buf(&os->ctx->pb);
626 avio_close(os->ctx->pb);
629 avformat_free_context(os->ctx);
653 int timescale = c->use_timeline ? os->ctx->streams[0]->time_base.den : AV_TIME_BASE;
1491 AVFormatContext *ctx;
1541 os->ctx = ctx = avformat_alloc_context();
1542 if (!ctx)
1545 ctx->oformat = av_guess_format(os->format_name, NULL, NULL);
1546 if (!ctx->oformat)
1548 ctx->interrupt_callback = s->interrupt_callback;
1549 ctx->opaque = s->opaque;
1550 ctx->io_close = s->io_close;
1551 ctx->io_close2 = s->io_close2;
1552 ctx->io_open = s->io_open;
1553 ctx->strict_std_compliance = s->strict_std_compliance;
1555 if (!(st = avformat_new_stream(ctx, NULL)))
1561 ctx->avoid_negative_ts = s->avoid_negative_ts;
1562 ctx->flags = s->flags;
1587 if ((ret = avio_open_dyn_buf(&ctx->pb)) < 0)
1591 ctx->url = av_strdup(filename);
1592 ret = avio_open2(&ctx->pb, filename, AVIO_FLAG_WRITE, NULL, &opts);
1660 ret = avformat_init_output(ctx, &opts);
1665 avio_flush(ctx->pb);
1673 s->avoid_negative_ts = ctx->avoid_negative_ts;
1739 if ((ret = avformat_write_header(os->ctx, NULL)) < 0)
1828 AVCodecParameters *par = os->ctx->streams[0]->codecpar;
1973 ret = ff_rename(os->temp_path, os->full_path, os->ctx);
2009 if (os->ctx && os->ctx_inited) {
2010 int64_t file_size = avio_tell(os->ctx->pb);
2011 av_write_trailer(os->ctx);
2014 int64_t sidx_size = avio_tell(os->ctx->pb) - file_size;
2216 ret = av_write_frame(os->ctx, NULL);
2235 if ((ret = ff_write_chained(os->ctx, 0, pkt, s, 0)) < 0)
2252 write_styp(os->ctx->pb);
2285 avio_flush(os->ctx->pb);
2286 len = avio_get_dyn_buf (os->ctx->pb, &buf);
2344 AVFormatContext *oc = os->ctx;