Revision 6e89b612 libavformat/aviobuf.c

View differences:

libavformat/aviobuf.c
283 283
    return len;
284 284
}
285 285

  
286
int avio_put_str16le(ByteIOContext *s, const char *str)
287
{
288
    const uint8_t *q = str;
289
    int ret = 0;
290

  
291
    while (*q) {
292
        uint32_t ch;
293
        uint16_t tmp;
294

  
295
        GET_UTF8(ch, *q++, break;)
296
        PUT_UTF16(ch, tmp, put_le16(s, tmp);ret += 2;)
297
    }
298
    put_le16(s, 0);
299
    ret += 2;
300
    return ret;
301
}
302

  
286 303
int ff_get_v_length(uint64_t val){
287 304
    int i=1;
288 305

  

Also available in: Unified diff