# HG changeset patch # User michael # Date 1073403096 0 # Node ID ad2a57c5467a8142072a38242e2f193515a09a6c # Parent 850f7b4f15ed132c749b45fa86e9e655af0a3325 ASF extended header parsing patch by ("Kevin Kuphal" ) diff -r 850f7b4f15ed -r ad2a57c5467a asf.c --- a/asf.c Sun Jan 04 19:53:44 2004 +0000 +++ b/asf.c Tue Jan 06 15:31:36 2004 +0000 @@ -176,6 +176,10 @@ 0xabd3d211, 0xa9ba, 0x11cf, { 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65 }, }; +static const GUID extended_content_header = { + 0xD2D0A440, 0xE307, 0x11D2, { 0x97, 0xF0, 0x00, 0xA0, 0xC9, 0x5E, 0xA8, 0x50 }, +}; + /* I am not a number !!! This GUID is the one found on the PC used to generate the stream */ static const GUID my_guid = { @@ -947,6 +951,38 @@ get_str16_nolen(pb, len3, s->copyright, sizeof(s->copyright)); get_str16_nolen(pb, len4, s->comment, sizeof(s->comment)); url_fskip(pb, len5); + } else if (!memcmp(&g, &extended_content_header, sizeof(GUID))) { + int desc_count, i; + + desc_count = get_le16(pb); + for(i=0;ialbum, value); } + av_free(value); + } + if ((value_type >= 2) || (value_type <= 5)) // boolean or DWORD or QWORD or WORD + { + if (value_type==2) value_num = get_le32(pb); + if (value_type==3) value_num = get_le32(pb); + if (value_type==4) value_num = get_le64(pb); + if (value_type==5) value_num = get_le16(pb); + if (strcmp(name,"WM/Track")==0) s->track = value_num + 1; + if (strcmp(name,"WM/TrackNumber")==0) s->track = value_num; + } + av_free(name); + } #if 0 } else if (!memcmp(&g, &head1_guid, sizeof(GUID))) { int v1, v2;