| 166 | } |
| 167 | |
| 168 | static void flush_buffer(AVIOContext *s) |
| 169 | { |
| 170 | s->buf_ptr_max = FFMAX(s->buf_ptr, s->buf_ptr_max); |
| 171 | if (s->write_flag && s->buf_ptr_max > s->buffer) { |
| 172 | writeout(s, s->buffer, s->buf_ptr_max - s->buffer); |
| 173 | if (s->update_checksum) { |
| 174 | s->checksum = s->update_checksum(s->checksum, s->checksum_ptr, |
| 175 | s->buf_ptr_max - s->checksum_ptr); |
| 176 | s->checksum_ptr = s->buffer; |
| 177 | } |
| 178 | } |
| 179 | s->buf_ptr = s->buf_ptr_max = s->buffer; |
| 180 | if (!s->write_flag) |
| 181 | s->buf_end = s->buffer; |
| 182 | } |
| 183 | |
| 184 | void avio_w8(AVIOContext *s, int b) |
| 185 | { |
no test coverage detected