| 1001 | } |
| 1002 | |
| 1003 | static 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 | |
| 1025 | static int seg_check_bitstream(AVFormatContext *s, AVStream *st, |
| 1026 | const AVPacket *pkt) |
nothing calls this directly
no test coverage detected