Revision 88b51ea9

View differences:

libavformat/asf.c
106 106
        0xea, 0xcb, 0xf8, 0xc5, 0xaf, 0x5b, 0x77, 0x48, 0x84, 0x67, 0xaa, 0x8c, 0x44, 0xfa, 0x4c, 0xca
107 107
};
108 108

  
109
const ff_asf_guid ff_asf_marker_header = {
110
        0x01, 0xCD, 0x87, 0xF4, 0x51, 0xA9, 0xCF, 0x11, 0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65
111
};
112

  
109 113
/* I am not a number !!! This GUID is the one found on the PC used to
110 114
   generate the stream */
111 115
const ff_asf_guid ff_asf_my_guid = {
libavformat/asf.h
158 158
extern const ff_asf_guid ff_asf_ext_stream_embed_stream_header;
159 159
extern const ff_asf_guid ff_asf_ext_stream_audio_stream;
160 160
extern const ff_asf_guid ff_asf_metadata_header;
161
extern const ff_asf_guid ff_asf_marker_header;
161 162
extern const ff_asf_guid ff_asf_my_guid;
162 163
extern const ff_asf_guid ff_asf_language_guid;
163 164
extern const ff_asf_guid ff_asf_content_encryption;
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