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

Function write_fragment

tools/ismindex.c:146–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static int write_fragment(const char *filename, AVIOContext *in)
147{
148 AVIOContext *out = NULL;
149 int ret;
150
151 if ((ret = avio_open2(&out, filename, AVIO_FLAG_WRITE, NULL, NULL)) < 0) {
152 fprintf(stderr, "Unable to open %s: %s\n", filename, av_err2str(ret));
153 return ret;
154 }
155 ret = copy_tag(in, out, MKBETAG('m', 'o', 'o', 'f'));
156 if (!ret)
157 ret = copy_tag(in, out, MKBETAG('m', 'd', 'a', 't'));
158
159 avio_flush(out);
160 avio_close(out);
161
162 return ret;
163}
164
165static int skip_fragment(AVIOContext *in)
166{

Callers 1

write_fragmentsFunction · 0.85

Calls 4

avio_open2Function · 0.85
copy_tagFunction · 0.85
avio_flushFunction · 0.85
avio_closeFunction · 0.85

Tested by

no test coverage detected