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

Function seg_write_trailer

libavformat/segment.c:1003–1023  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003static int seg_write_trailer(struct AVFormatContext *s)
1004{
1005 SegmentContext *seg = s->priv_data;
1006 AVFormatContext *oc = seg->avf;
1007 int ret;
1008
1009 if (!oc)
1010 return 0;
1011
1012 if (!seg->write_header_trailer) {
1013 if ((ret = segment_end(s, 0, 1)) < 0)
1014 return ret;
1015 if ((ret = open_null_ctx(&oc->pb)) < 0)
1016 return ret;
1017 seg->is_nullctx = 1;
1018 ret = av_write_trailer(oc);
1019 } else {
1020 ret = segment_end(s, 1, 1);
1021 }
1022 return ret;
1023}
1024
1025static int seg_check_bitstream(AVFormatContext *s, AVStream *st,
1026 const AVPacket *pkt)

Callers

nothing calls this directly

Calls 3

segment_endFunction · 0.85
open_null_ctxFunction · 0.85
av_write_trailerFunction · 0.85

Tested by

no test coverage detected