MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / close_slave

Function close_slave

libavformat/tee.c:119–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119static int close_slave(TeeSlave *tee_slave)
120{
121 AVFormatContext *avf;
122 int ret = 0;
123
124 av_dict_free(&tee_slave->fifo_options);
125 avf = tee_slave->avf;
126 if (!avf)
127 return 0;
128
129 if (tee_slave->header_written)
130 ret = av_write_trailer(avf);
131
132 if (tee_slave->bsfs) {
133 for (unsigned i = 0; i < avf->nb_streams; ++i)
134 av_bsf_free(&tee_slave->bsfs[i]);
135 }
136 av_freep(&tee_slave->stream_map);
137 av_freep(&tee_slave->bsfs);
138
139 ff_format_io_close(avf, &avf->pb);
140 avformat_free_context(avf);
141 tee_slave->avf = NULL;
142 return ret;
143}
144
145static void close_slaves(AVFormatContext *avf)
146{

Callers 3

close_slavesFunction · 0.85
tee_write_trailerFunction · 0.85

Calls 6

av_dict_freeFunction · 0.85
av_write_trailerFunction · 0.85
av_bsf_freeFunction · 0.85
av_freepFunction · 0.85
ff_format_io_closeFunction · 0.85
avformat_free_contextFunction · 0.85

Tested by

no test coverage detected