Lines Matching defs:of
2 * This file is part of FFmpeg.
5 * modify it under the terms of the GNU Lesser General Public
7 * version 2.1 of the License, or (at your option) any later version.
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * You should have received a copy of the GNU Lesser General Public
44 void of_write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost,
47 AVFormatContext *s = of->ctx;
53 * But there is no reordering, so we can limit the number of output packets
55 * Counting encoded video frames needs to be done separately because of
67 if (!of->header_written) {
230 int of_check_init(OutputFile *of)
234 for (i = 0; i < of->ctx->nb_streams; i++) {
235 OutputStream *ost = output_streams[of->ost_index + i];
240 ret = avformat_write_header(of->ctx, &of->opts);
245 of->index, av_err2str(ret));
248 //assert_avoptions(of->opts);
249 of->header_written = 1;
251 av_dump_format(of->ctx, of->index, of->ctx->url, 1);
263 for (i = 0; i < of->ctx->nb_streams; i++) {
264 OutputStream *ost = output_streams[of->ost_index + i];
273 of_write_packet(of, pkt, ost, 1);
281 int of_write_trailer(OutputFile *of)
285 if (!of->header_written) {
288 "at least one of its streams received no packets.\n",
289 of->index, of->ctx->url);
293 ret = av_write_trailer(of->ctx);
295 av_log(NULL, AV_LOG_ERROR, "Error writing trailer of %s: %s\n", of->ctx->url, av_err2str(ret));
304 OutputFile *of = *pof;
307 if (!of)
310 s = of->ctx;
314 av_dict_free(&of->opts);