Revision 531d8fa3

View differences:

libavformat/asfenc.c
203 203
    put_buffer(s, *g, sizeof(*g));
204 204
}
205 205

  
206
static void put_str16_nolen(ByteIOContext *s, const char *tag);
207
static void put_str16(ByteIOContext *s, const char *tag)
208
{
209
    put_le16(s,strlen(tag) + 1);
210
    put_str16_nolen(s, tag);
211
}
212

  
213 206
static void put_str16_nolen(ByteIOContext *s, const char *tag)
214 207
{
215 208
    int c;
......
449 442
    put_le32(pb, s->nb_streams);
450 443
    for(n=0;n<s->nb_streams;n++) {
451 444
        AVCodec *p;
445
        const char *desc;
452 446

  
453 447
        enc = s->streams[n]->codec;
454 448
        p = avcodec_find_encoder(enc->codec_id);
......
461 455
            put_le16(pb, -1);
462 456

  
463 457
        if(enc->codec_id == CODEC_ID_WMAV2)
464
            put_str16(pb, "Windows Media Audio V8");
458
            desc = "Windows Media Audio V8";
465 459
        else
466
            put_str16(pb, p ? p->name : enc->codec_name);
460
            desc = p ? p->name : enc->codec_name;
461
        put_le16(pb, strlen(desc) + 1); // "number of characters" = length in bytes / 2
462
        put_str16_nolen(pb, desc);
467 463
        put_le16(pb, 0); /* no parameters */
468 464

  
469 465

  

Also available in: Unified diff