Revision 88b51ea9 libavformat/asfdec.c

View differences:

libavformat/asfdec.c
82 82
    else PRINT_IF_GUID(g, ff_asf_ext_stream_embed_stream_header);
83 83
    else PRINT_IF_GUID(g, ff_asf_ext_stream_audio_stream);
84 84
    else PRINT_IF_GUID(g, ff_asf_metadata_header);
85
    else PRINT_IF_GUID(g, ff_asf_marker_header);
85 86
    else PRINT_IF_GUID(g, stream_bitrate_guid);
86 87
    else PRINT_IF_GUID(g, ff_asf_language_guid);
87 88
    else
......
520 521
            get_guid(pb, &g);
521 522
            v1 = get_le32(pb);
522 523
            v2 = get_le16(pb);
524
        } else if (!guidcmp(&g, &ff_asf_marker_header)) {
525
            int i, count, name_len;
526
            char name[1024];
527

  
528
            get_le64(pb);            // reserved 16 bytes
529
            get_le64(pb);            // ...
530
            count = get_le32(pb);    // markers count
531
            get_le16(pb);            // reserved 2 bytes
532
            name_len = get_le16(pb); // name length
533
            for(i=0;i<name_len;i++){
534
                get_byte(pb); // skip the name
535
            }
536

  
537
            for(i=0;i<count;i++){
538
                int64_t pres_time;
539
                int name_len;
540

  
541
                get_le64(pb);             // offset, 8 bytes
542
                pres_time = get_le64(pb); // presentation time
543
                get_le16(pb);             // entry length
544
                get_le32(pb);             // send time
545
                get_le32(pb);             // flags
546
                name_len = get_le32(pb);  // name length
547
                get_str16_nolen(pb, name_len * 2, name, sizeof(name));
548
                ff_new_chapter(s, i, (AVRational){1, 10000000}, pres_time, AV_NOPTS_VALUE, name );
549
            }
523 550
#if 0
524 551
        } else if (!guidcmp(&g, &ff_asf_codec_comment_header)) {
525 552
            int len, v1, n, num;

Also available in: Unified diff