| 146 | } |
| 147 | |
| 148 | void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size) |
| 149 | { |
| 150 | unsigned room, real_n; |
| 151 | |
| 152 | while (1) { |
| 153 | room = av_bprint_room(buf); |
| 154 | if (size < room) |
| 155 | break; |
| 156 | if (av_bprint_alloc(buf, size)) |
| 157 | break; |
| 158 | } |
| 159 | if (room) { |
| 160 | real_n = FFMIN(size, room - 1); |
| 161 | memcpy(buf->str + buf->len, data, real_n); |
| 162 | } |
| 163 | av_bprint_grow(buf, size); |
| 164 | } |
| 165 | |
| 166 | void av_bprint_strftime(AVBPrint *buf, const char *fmt, const struct tm *tm) |
| 167 | { |
no test coverage detected