Revision 17af0525

View differences:

libavformat/Makefile
18 18
OBJS-$(CONFIG_AMR_MUXER)                 += amr.o
19 19
OBJS-$(CONFIG_APC_DEMUXER)               += apc.o
20 20
OBJS-$(CONFIG_APE_DEMUXER)               += ape.o
21
OBJS-$(CONFIG_ASF_DEMUXER)               += asfdec.o asfcrypt.o riff.o
22
OBJS-$(CONFIG_ASF_MUXER)                 += asfenc.o riff.o
23
OBJS-$(CONFIG_ASF_STREAM_MUXER)          += asfenc.o riff.o
21
OBJS-$(CONFIG_ASF_DEMUXER)               += asfdec.o asf.o asfcrypt.o riff.o
22
OBJS-$(CONFIG_ASF_MUXER)                 += asfenc.o asf.o riff.o
23
OBJS-$(CONFIG_ASF_STREAM_MUXER)          += asfenc.o asf.o riff.o
24 24
OBJS-$(CONFIG_ASS_DEMUXER)               += assdec.o
25 25
OBJS-$(CONFIG_ASS_MUXER)                 += assenc.o
26 26
OBJS-$(CONFIG_AU_DEMUXER)                += au.o raw.o
libavformat/asf.c
1
/*
2
 * Copyright (c) 2000, 2001 Fabrice Bellard
3
 *
4
 * This file is part of FFmpeg.
5
 *
6
 * FFmpeg is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU Lesser General Public
8
 * License as published by the Free Software Foundation; either
9
 * version 2.1 of the License, or (at your option) any later version.
10
 *
11
 * FFmpeg is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 * Lesser General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Lesser General Public
17
 * License along with FFmpeg; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
 */
20

  
21
#include "asf.h"
22

  
23

  
24
const GUID ff_asf_header = {
25
    0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C
26
};
27

  
28
const GUID ff_asf_file_header = {
29
    0xA1, 0xDC, 0xAB, 0x8C, 0x47, 0xA9, 0xCF, 0x11, 0x8E, 0xE4, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65
30
};
31

  
32
const GUID ff_asf_stream_header = {
33
    0x91, 0x07, 0xDC, 0xB7, 0xB7, 0xA9, 0xCF, 0x11, 0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65
34
};
35

  
36
const GUID ff_asf_ext_stream_header = {
37
    0xCB, 0xA5, 0xE6, 0x14, 0x72, 0xC6, 0x32, 0x43, 0x83, 0x99, 0xA9, 0x69, 0x52, 0x06, 0x5B, 0x5A
38
};
39

  
40
const GUID ff_asf_audio_stream = {
41
    0x40, 0x9E, 0x69, 0xF8, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B
42
};
43

  
44
const GUID ff_asf_audio_conceal_none = {
45
    // 0x40, 0xa4, 0xf1, 0x49, 0x4ece, 0x11d0, 0xa3, 0xac, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6
46
    // New value lifted from avifile
47
    0x00, 0x57, 0xfb, 0x20, 0x55, 0x5B, 0xCF, 0x11, 0xa8, 0xfd, 0x00, 0x80, 0x5f, 0x5c, 0x44, 0x2b
48
};
49

  
50
const GUID ff_asf_audio_conceal_spread = {
51
     0x50, 0xCD, 0xC3, 0xBF, 0x8F, 0x61, 0xCF, 0x11, 0x8B, 0xB2, 0x00, 0xAA, 0x00, 0xB4, 0xE2, 0x20
52
};
53

  
54
const GUID ff_asf_video_stream = {
55
    0xC0, 0xEF, 0x19, 0xBC, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B
56
};
57

  
58
const GUID ff_asf_video_conceal_none = {
59
    0x00, 0x57, 0xFB, 0x20, 0x55, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B
60
};
61

  
62
const GUID ff_asf_command_stream = {
63
    0xC0, 0xCF, 0xDA, 0x59, 0xE6, 0x59, 0xD0, 0x11, 0xA3, 0xAC, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6
64
};
65

  
66
const GUID ff_asf_comment_header = {
67
    0x33, 0x26, 0xb2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c
68
};
69

  
70
const GUID ff_asf_codec_comment_header = {
71
    0x40, 0x52, 0xD1, 0x86, 0x1D, 0x31, 0xD0, 0x11, 0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6
72
};
73
const GUID ff_asf_codec_comment1_header = {
74
    0x41, 0x52, 0xd1, 0x86, 0x1D, 0x31, 0xD0, 0x11, 0xa3, 0xa4, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6
75
};
76

  
77
const GUID ff_asf_data_header = {
78
    0x36, 0x26, 0xb2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c
79
};
80

  
81
const GUID ff_asf_head1_guid = {
82
    0xb5, 0x03, 0xbf, 0x5f, 0x2E, 0xA9, 0xCF, 0x11, 0x8e, 0xe3, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65
83
};
84

  
85
const GUID ff_asf_head2_guid = {
86
    0x11, 0xd2, 0xd3, 0xab, 0xBA, 0xA9, 0xCF, 0x11, 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65
87
};
88

  
89
const GUID ff_asf_extended_content_header = {
90
        0x40, 0xA4, 0xD0, 0xD2, 0x07, 0xE3, 0xD2, 0x11, 0x97, 0xF0, 0x00, 0xA0, 0xC9, 0x5E, 0xA8, 0x50
91
};
92

  
93
const GUID ff_asf_simple_index_header = {
94
        0x90, 0x08, 0x00, 0x33, 0xB1, 0xE5, 0xCF, 0x11, 0x89, 0xF4, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xCB
95
};
96

  
97
const GUID ff_asf_ext_stream_embed_stream_header = {
98
        0xe2, 0x65, 0xfb, 0x3a, 0xEF, 0x47, 0xF2, 0x40, 0xac, 0x2c, 0x70, 0xa9, 0x0d, 0x71, 0xd3, 0x43
99
};
100

  
101
const GUID ff_asf_ext_stream_audio_stream = {
102
        0x9d, 0x8c, 0x17, 0x31, 0xE1, 0x03, 0x28, 0x45, 0xb5, 0x82, 0x3d, 0xf9, 0xdb, 0x22, 0xf5, 0x03
103
};
104

  
105
const GUID ff_asf_metadata_header = {
106
        0xea, 0xcb, 0xf8, 0xc5, 0xaf, 0x5b, 0x77, 0x48, 0x84, 0x67, 0xaa, 0x8c, 0x44, 0xfa, 0x4c, 0xca
107
};
108

  
109
/* I am not a number !!! This GUID is the one found on the PC used to
110
   generate the stream */
111
const GUID ff_asf_my_guid = {
112
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
113
};
libavformat/asf.h
134 134
    ASFStream* asf_st;                   ///< currently decoded stream
135 135
} ASFContext;
136 136

  
137
static const GUID asf_header = {
138
    0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C
139
};
140

  
141
static const GUID file_header = {
142
    0xA1, 0xDC, 0xAB, 0x8C, 0x47, 0xA9, 0xCF, 0x11, 0x8E, 0xE4, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65
143
};
144

  
145
static const GUID stream_header = {
146
    0x91, 0x07, 0xDC, 0xB7, 0xB7, 0xA9, 0xCF, 0x11, 0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65
147
};
148

  
149
static const GUID ext_stream_header = {
150
    0xCB, 0xA5, 0xE6, 0x14, 0x72, 0xC6, 0x32, 0x43, 0x83, 0x99, 0xA9, 0x69, 0x52, 0x06, 0x5B, 0x5A
151
};
152

  
153
static const GUID audio_stream = {
154
    0x40, 0x9E, 0x69, 0xF8, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B
155
};
156

  
157
static const GUID audio_conceal_none = {
158
    // 0x40, 0xa4, 0xf1, 0x49, 0x4ece, 0x11d0, 0xa3, 0xac, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6
159
    // New value lifted from avifile
160
    0x00, 0x57, 0xfb, 0x20, 0x55, 0x5B, 0xCF, 0x11, 0xa8, 0xfd, 0x00, 0x80, 0x5f, 0x5c, 0x44, 0x2b
161
};
162

  
163
static const GUID audio_conceal_spread = {
164
     0x50, 0xCD, 0xC3, 0xBF, 0x8F, 0x61, 0xCF, 0x11, 0x8B, 0xB2, 0x00, 0xAA, 0x00, 0xB4, 0xE2, 0x20
165
};
166

  
167
static const GUID video_stream = {
168
    0xC0, 0xEF, 0x19, 0xBC, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B
169
};
170

  
171
static const GUID video_conceal_none = {
172
    0x00, 0x57, 0xFB, 0x20, 0x55, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B
173
};
174

  
175
static const GUID command_stream = {
176
    0xC0, 0xCF, 0xDA, 0x59, 0xE6, 0x59, 0xD0, 0x11, 0xA3, 0xAC, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6
177
};
178

  
179
static const GUID comment_header = {
180
    0x33, 0x26, 0xb2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c
181
};
182

  
183
static const GUID codec_comment_header = {
184
    0x40, 0x52, 0xD1, 0x86, 0x1D, 0x31, 0xD0, 0x11, 0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x03, 0x48, 0xF6
185
};
186
static const GUID codec_comment1_header = {
187
    0x41, 0x52, 0xd1, 0x86, 0x1D, 0x31, 0xD0, 0x11, 0xa3, 0xa4, 0x00, 0xa0, 0xc9, 0x03, 0x48, 0xf6
188
};
189

  
190
static const GUID data_header = {
191
    0x36, 0x26, 0xb2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xa6, 0xd9, 0x00, 0xaa, 0x00, 0x62, 0xce, 0x6c
192
};
193

  
194
static const GUID head1_guid = {
195
    0xb5, 0x03, 0xbf, 0x5f, 0x2E, 0xA9, 0xCF, 0x11, 0x8e, 0xe3, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65
196
};
197

  
198
static const GUID head2_guid = {
199
    0x11, 0xd2, 0xd3, 0xab, 0xBA, 0xA9, 0xCF, 0x11, 0x8e, 0xe6, 0x00, 0xc0, 0x0c, 0x20, 0x53, 0x65
200
};
201

  
202
static const GUID extended_content_header = {
203
        0x40, 0xA4, 0xD0, 0xD2, 0x07, 0xE3, 0xD2, 0x11, 0x97, 0xF0, 0x00, 0xA0, 0xC9, 0x5E, 0xA8, 0x50
204
};
205

  
206
static const GUID simple_index_header = {
207
        0x90, 0x08, 0x00, 0x33, 0xB1, 0xE5, 0xCF, 0x11, 0x89, 0xF4, 0x00, 0xA0, 0xC9, 0x03, 0x49, 0xCB
208
};
209

  
210
static const GUID ext_stream_embed_stream_header = {
211
        0xe2, 0x65, 0xfb, 0x3a, 0xEF, 0x47, 0xF2, 0x40, 0xac, 0x2c, 0x70, 0xa9, 0x0d, 0x71, 0xd3, 0x43
212
};
213

  
214
static const GUID ext_stream_audio_stream = {
215
        0x9d, 0x8c, 0x17, 0x31, 0xE1, 0x03, 0x28, 0x45, 0xb5, 0x82, 0x3d, 0xf9, 0xdb, 0x22, 0xf5, 0x03
216
};
217

  
218
static const GUID metadata_header = {
219
        0xea, 0xcb, 0xf8, 0xc5, 0xaf, 0x5b, 0x77, 0x48, 0x84, 0x67, 0xaa, 0x8c, 0x44, 0xfa, 0x4c, 0xca
220
};
221

  
222
/* I am not a number !!! This GUID is the one found on the PC used to
223
   generate the stream */
224
static const GUID my_guid = {
225
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
226
};
137
extern const GUID ff_asf_header;
138
extern const GUID ff_asf_file_header;
139
extern const GUID ff_asf_stream_header;
140
extern const GUID ff_asf_ext_stream_header;
141
extern const GUID ff_asf_audio_stream;
142
extern const GUID ff_asf_audio_conceal_none;
143
extern const GUID ff_asf_audio_conceal_spread;
144
extern const GUID ff_asf_video_stream;
145
extern const GUID ff_asf_video_conceal_none;
146
extern const GUID ff_asf_command_stream;
147
extern const GUID ff_asf_comment_header;
148
extern const GUID ff_asf_codec_comment_header;
149
extern const GUID ff_asf_codec_comment1_header;
150
extern const GUID ff_asf_data_header;
151
extern const GUID ff_asf_head1_guid;
152
extern const GUID ff_asf_head2_guid;
153
extern const GUID ff_asf_extended_content_header;
154
extern const GUID ff_asf_simple_index_header;
155
extern const GUID ff_asf_ext_stream_embed_stream_header;
156
extern const GUID ff_asf_ext_stream_audio_stream;
157
extern const GUID ff_asf_metadata_header;
158
extern const GUID ff_asf_my_guid;
227 159

  
228 160
#define ASF_PACKET_FLAG_ERROR_CORRECTION_PRESENT 0x80 //1000 0000
229 161

  
libavformat/asfdec.c
54 54
static void print_guid(const GUID *g)
55 55
{
56 56
    int i;
57
    PRINT_IF_GUID(g, asf_header);
58
    else PRINT_IF_GUID(g, file_header);
59
    else PRINT_IF_GUID(g, stream_header);
60
    else PRINT_IF_GUID(g, audio_stream);
61
    else PRINT_IF_GUID(g, audio_conceal_none);
62
    else PRINT_IF_GUID(g, video_stream);
63
    else PRINT_IF_GUID(g, video_conceal_none);
64
    else PRINT_IF_GUID(g, command_stream);
65
    else PRINT_IF_GUID(g, comment_header);
66
    else PRINT_IF_GUID(g, codec_comment_header);
67
    else PRINT_IF_GUID(g, codec_comment1_header);
68
    else PRINT_IF_GUID(g, data_header);
57
    PRINT_IF_GUID(g, ff_asf_header);
58
    else PRINT_IF_GUID(g, ff_asf_file_header);
59
    else PRINT_IF_GUID(g, ff_asf_stream_header);
60
    else PRINT_IF_GUID(g, ff_asf_audio_stream);
61
    else PRINT_IF_GUID(g, ff_asf_audio_conceal_none);
62
    else PRINT_IF_GUID(g, ff_asf_video_stream);
63
    else PRINT_IF_GUID(g, ff_asf_video_conceal_none);
64
    else PRINT_IF_GUID(g, ff_asf_command_stream);
65
    else PRINT_IF_GUID(g, ff_asf_comment_header);
66
    else PRINT_IF_GUID(g, ff_asf_codec_comment_header);
67
    else PRINT_IF_GUID(g, ff_asf_codec_comment1_header);
68
    else PRINT_IF_GUID(g, ff_asf_data_header);
69 69
    else PRINT_IF_GUID(g, index_guid);
70
    else PRINT_IF_GUID(g, head1_guid);
71
    else PRINT_IF_GUID(g, head2_guid);
72
    else PRINT_IF_GUID(g, my_guid);
73
    else PRINT_IF_GUID(g, ext_stream_header);
74
    else PRINT_IF_GUID(g, extended_content_header);
75
    else PRINT_IF_GUID(g, ext_stream_embed_stream_header);
76
    else PRINT_IF_GUID(g, ext_stream_audio_stream);
77
    else PRINT_IF_GUID(g, metadata_header);
70
    else PRINT_IF_GUID(g, ff_asf_head1_guid);
71
    else PRINT_IF_GUID(g, ff_asf_head2_guid);
72
    else PRINT_IF_GUID(g, ff_asf_my_guid);
73
    else PRINT_IF_GUID(g, ff_asf_ext_stream_header);
74
    else PRINT_IF_GUID(g, ff_asf_extended_content_header);
75
    else PRINT_IF_GUID(g, ff_asf_ext_stream_embed_stream_header);
76
    else PRINT_IF_GUID(g, ff_asf_ext_stream_audio_stream);
77
    else PRINT_IF_GUID(g, ff_asf_metadata_header);
78 78
    else PRINT_IF_GUID(g, stream_bitrate_guid);
79 79
    else
80 80
        dprintf(NULL, "(GUID: unknown) ");
......
125 125
static int asf_probe(AVProbeData *pd)
126 126
{
127 127
    /* check file header */
128
    if (!memcmp(pd->buf, &asf_header, sizeof(GUID)))
128
    if (!memcmp(pd->buf, &ff_asf_header, sizeof(GUID)))
129 129
        return AVPROBE_SCORE_MAX;
130 130
    else
131 131
        return 0;
......
174 174
    memset(bitrate, 0, sizeof(bitrate));
175 175

  
176 176
    get_guid(pb, &g);
177
    if (memcmp(&g, &asf_header, sizeof(GUID)))
177
    if (memcmp(&g, &ff_asf_header, sizeof(GUID)))
178 178
        return -1;
179 179
    get_le64(pb);
180 180
    get_le32(pb);
......
187 187
        dprintf(s, "%08"PRIx64": ", url_ftell(pb) - 24);
188 188
        print_guid(&g);
189 189
        dprintf(s, "  size=0x%"PRIx64"\n", gsize);
190
        if (!memcmp(&g, &data_header, sizeof(GUID))) {
190
        if (!memcmp(&g, &ff_asf_data_header, sizeof(GUID))) {
191 191
            asf->data_object_offset = url_ftell(pb);
192 192
            // if not streaming, gsize is not unlimited (how?), and there is enough space in the file..
193 193
            if (!(asf->hdr.flags & 0x01) && gsize >= 100) {
......
199 199
        }
200 200
        if (gsize < 24)
201 201
            return -1;
202
        if (!memcmp(&g, &file_header, sizeof(GUID))) {
202
        if (!memcmp(&g, &ff_asf_file_header, sizeof(GUID))) {
203 203
            get_guid(pb, &asf->hdr.guid);
204 204
            asf->hdr.file_size          = get_le64(pb);
205 205
            asf->hdr.create_time        = get_le64(pb);
......
213 213
            asf->hdr.max_pktsize        = get_le32(pb);
214 214
            asf->hdr.max_bitrate        = get_le32(pb);
215 215
            asf->packet_size = asf->hdr.max_pktsize;
216
        } else if (!memcmp(&g, &stream_header, sizeof(GUID))) {
216
        } else if (!memcmp(&g, &ff_asf_stream_header, sizeof(GUID))) {
217 217
            enum CodecType type;
218 218
            int type_specific_size, sizeX;
219 219
            uint64_t total_size;
......
240 240
            get_guid(pb, &g);
241 241

  
242 242
            test_for_ext_stream_audio = 0;
243
            if (!memcmp(&g, &audio_stream, sizeof(GUID))) {
243
            if (!memcmp(&g, &ff_asf_audio_stream, sizeof(GUID))) {
244 244
                type = CODEC_TYPE_AUDIO;
245
            } else if (!memcmp(&g, &video_stream, sizeof(GUID))) {
245
            } else if (!memcmp(&g, &ff_asf_video_stream, sizeof(GUID))) {
246 246
                type = CODEC_TYPE_VIDEO;
247
            } else if (!memcmp(&g, &command_stream, sizeof(GUID))) {
247
            } else if (!memcmp(&g, &ff_asf_command_stream, sizeof(GUID))) {
248 248
                type = CODEC_TYPE_DATA;
249
            } else if (!memcmp(&g, &ext_stream_embed_stream_header, sizeof(GUID))) {
249
            } else if (!memcmp(&g, &ff_asf_ext_stream_embed_stream_header, sizeof(GUID))) {
250 250
                test_for_ext_stream_audio = 1;
251 251
                type = CODEC_TYPE_UNKNOWN;
252 252
            } else {
......
264 264

  
265 265
            if (test_for_ext_stream_audio) {
266 266
                get_guid(pb, &g);
267
                if (!memcmp(&g, &ext_stream_audio_stream, sizeof(GUID))) {
267
                if (!memcmp(&g, &ff_asf_ext_stream_audio_stream, sizeof(GUID))) {
268 268
                    type = CODEC_TYPE_AUDIO;
269 269
                    is_dvr_ms_audio=1;
270 270
                    get_guid(pb, &g);
......
370 370
            }
371 371
            pos2 = url_ftell(pb);
372 372
            url_fskip(pb, gsize - (pos2 - pos1 + 24));
373
        } else if (!memcmp(&g, &comment_header, sizeof(GUID))) {
373
        } else if (!memcmp(&g, &ff_asf_comment_header, sizeof(GUID))) {
374 374
            int len1, len2, len3, len4, len5;
375 375

  
376 376
            len1 = get_le16(pb);
......
398 398
//                av_log(s, AV_LOG_ERROR, "flags: 0x%x stream id %d, bitrate %d\n", flags, stream_id, bitrate);
399 399
                asf->stream_bitrates[stream_id]= bitrate;
400 400
            }
401
       } else if (!memcmp(&g, &extended_content_header, sizeof(GUID))) {
401
       } else if (!memcmp(&g, &ff_asf_extended_content_header, sizeof(GUID))) {
402 402
                int desc_count, i;
403 403

  
404 404
                desc_count = get_le16(pb);
......
413 413
                        value_len = get_le16(pb);
414 414
                        get_tag(s, name, value_type, value_len);
415 415
                }
416
        } else if (!memcmp(&g, &metadata_header, sizeof(GUID))) {
416
        } else if (!memcmp(&g, &ff_asf_metadata_header, sizeof(GUID))) {
417 417
            int n, stream_num, name_len, value_len, value_type, value_num;
418 418
            n = get_le16(pb);
419 419

  
......
436 436
                    else if(!strcmp(name, "AspectRatioY")) dar[stream_num].den= value_num;
437 437
                }
438 438
            }
439
        } else if (!memcmp(&g, &ext_stream_header, sizeof(GUID))) {
439
        } else if (!memcmp(&g, &ff_asf_ext_stream_header, sizeof(GUID))) {
440 440
            int ext_len, payload_ext_ct, stream_ct;
441 441
            uint32_t ext_d, leak_rate, stream_num;
442 442
            int64_t pos_ex_st;
......
476 476

  
477 477
            // there could be a optional stream properties object to follow
478 478
            // if so the next iteration will pick it up
479
        } else if (!memcmp(&g, &head1_guid, sizeof(GUID))) {
479
        } else if (!memcmp(&g, &ff_asf_head1_guid, sizeof(GUID))) {
480 480
            int v1, v2;
481 481
            get_guid(pb, &g);
482 482
            v1 = get_le32(pb);
483 483
            v2 = get_le16(pb);
484 484
#if 0
485
        } else if (!memcmp(&g, &codec_comment_header, sizeof(GUID))) {
485
        } else if (!memcmp(&g, &ff_asf_codec_comment_header, sizeof(GUID))) {
486 486
            int len, v1, n, num;
487 487
            char str[256], *q;
488 488
            char tag[16];
libavformat/asfenc.c
303 303
        put_chunk(s, 0x4824, 0, 0xc00); /* start of stream (length will be patched later) */
304 304
    }
305 305

  
306
    put_guid(pb, &asf_header);
306
    put_guid(pb, &ff_asf_header);
307 307
    put_le64(pb, -1); /* header length, will be patched after */
308 308
    put_le32(pb, 3 + has_title + !!metadata_count + s->nb_streams); /* number of chunks in header */
309 309
    put_byte(pb, 1); /* ??? */
......
311 311

  
312 312
    /* file header */
313 313
    header_offset = url_ftell(pb);
314
    hpos = put_header(pb, &file_header);
315
    put_guid(pb, &my_guid);
314
    hpos = put_header(pb, &ff_asf_file_header);
315
    put_guid(pb, &ff_asf_my_guid);
316 316
    put_le64(pb, file_size);
317 317
    file_time = 0;
318 318
    put_le64(pb, unix_to_file_time(file_time));
......
327 327
    end_header(pb, hpos);
328 328

  
329 329
    /* unknown headers */
330
    hpos = put_header(pb, &head1_guid);
331
    put_guid(pb, &head2_guid);
330
    hpos = put_header(pb, &ff_asf_head1_guid);
331
    put_guid(pb, &ff_asf_head2_guid);
332 332
    put_le32(pb, 6);
333 333
    put_le16(pb, 0);
334 334
    end_header(pb, hpos);
335 335

  
336 336
    /* title and other infos */
337 337
    if (has_title) {
338
        hpos = put_header(pb, &comment_header);
338
        hpos = put_header(pb, &ff_asf_comment_header);
339 339
        put_le16(pb, title     ? 2 * (strlen(title->value    ) + 1) : 0);
340 340
        put_le16(pb, author    ? 2 * (strlen(author->value   ) + 1) : 0);
341 341
        put_le16(pb, copyright ? 2 * (strlen(copyright->value) + 1) : 0);
......
349 349
    }
350 350
    if (metadata_count) {
351 351
        AVMetadataTag *tag = NULL;
352
        hpos = put_header(pb, &extended_content_header);
352
        hpos = put_header(pb, &ff_asf_extended_content_header);
353 353
        put_le16(pb, metadata_count);
354 354
        while ((tag = av_metadata_get(s->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX))) {
355 355
            put_le16(pb, 2*(strlen(tag->key) + 3) + 1);
......
388 388
            break;
389 389
        }
390 390

  
391
        hpos = put_header(pb, &stream_header);
391
        hpos = put_header(pb, &ff_asf_stream_header);
392 392
        if (enc->codec_type == CODEC_TYPE_AUDIO) {
393
            put_guid(pb, &audio_stream);
394
            put_guid(pb, &audio_conceal_spread);
393
            put_guid(pb, &ff_asf_audio_stream);
394
            put_guid(pb, &ff_asf_audio_conceal_spread);
395 395
        } else {
396
            put_guid(pb, &video_stream);
397
            put_guid(pb, &video_conceal_none);
396
            put_guid(pb, &ff_asf_video_stream);
397
            put_guid(pb, &ff_asf_video_conceal_none);
398 398
        }
399 399
        put_le64(pb, 0); /* ??? */
400 400
        es_pos = url_ftell(pb);
......
444 444

  
445 445
    /* media comments */
446 446

  
447
    hpos = put_header(pb, &codec_comment_header);
448
    put_guid(pb, &codec_comment1_header);
447
    hpos = put_header(pb, &ff_asf_codec_comment_header);
448
    put_guid(pb, &ff_asf_codec_comment1_header);
449 449
    put_le32(pb, s->nb_streams);
450 450
    for(n=0;n<s->nb_streams;n++) {
451 451
        AVCodec *p;
......
501 501

  
502 502
    /* movie chunk, followed by packets of packet_size */
503 503
    asf->data_offset = cur_pos;
504
    put_guid(pb, &data_header);
504
    put_guid(pb, &ff_asf_data_header);
505 505
    put_le64(pb, data_chunk_size);
506
    put_guid(pb, &my_guid);
506
    put_guid(pb, &ff_asf_my_guid);
507 507
    put_le64(pb, asf->nb_packets); /* nb packets */
508 508
    put_byte(pb, 1); /* ??? */
509 509
    put_byte(pb, 1); /* ??? */
......
793 793
    ByteIOContext *pb = s->pb;
794 794
    int i;
795 795

  
796
    put_guid(pb, &simple_index_header);
796
    put_guid(pb, &ff_asf_simple_index_header);
797 797
    put_le64(pb, 24 + 16 + 8 + 4 + 4 + (4 + 2)*count);
798
    put_guid(pb, &my_guid);
798
    put_guid(pb, &ff_asf_my_guid);
799 799
    put_le64(pb, ASF_INDEXED_INTERVAL);
800 800
    put_le32(pb, max);
801 801
    put_le32(pb, count);

Also available in: Unified diff