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

Function writeout

libavformat/aviobuf.c:136–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136static void writeout(AVIOContext *s, const uint8_t *data, int len)
137{
138 FFIOContext *const ctx = ffiocontext(s);
139 if (!s->error) {
140 int ret = 0;
141 if (s->write_data_type)
142 ret = s->write_data_type(s->opaque, data,
143 len,
144 ctx->current_type,
145 ctx->last_time);
146 else if (s->write_packet)
147 ret = s->write_packet(s->opaque, data, len);
148 if (ret < 0) {
149 s->error = ret;
150 } else {
151 ctx->bytes_written += len;
152 s->bytes_written = ctx->bytes_written;
153
154 if (s->pos + len > ctx->written_output_size) {
155 ctx->written_output_size = s->pos + len;
156 }
157 }
158 }
159 if (ctx->current_type == AVIO_DATA_MARKER_SYNC_POINT ||
160 ctx->current_type == AVIO_DATA_MARKER_BOUNDARY_POINT) {
161 ctx->current_type = AVIO_DATA_MARKER_UNKNOWN;
162 }
163 ctx->last_time = AV_NOPTS_VALUE;
164 ctx->writeout_count++;
165 s->pos += len;
166}
167
168static void flush_buffer(AVIOContext *s)
169{

Callers 2

flush_bufferFunction · 0.85
avio_writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected