Statistics
| Branch: | Revision:

ffmpeg / libavformat / wav.c @ a2704c97

History | View | Annotate | Download (11.8 KB)

1 115329f1 Diego Biurrun
/*
2 7fbde343 Aurelien Jacobs
 * WAV muxer and demuxer
3 406792e7 Diego Biurrun
 * Copyright (c) 2001, 2002 Fabrice Bellard
4 de6d9b64 Fabrice Bellard
 *
5 740e89cf Daniel Verkamp
 * Sony Wave64 demuxer
6 811e0fc2 Daniel Verkamp
 * RF64 demuxer
7 740e89cf Daniel Verkamp
 * Copyright (c) 2009 Daniel Verkamp
8
 *
9 b78e7197 Diego Biurrun
 * This file is part of FFmpeg.
10
 *
11
 * FFmpeg is free software; you can redistribute it and/or
12 19720f15 Fabrice Bellard
 * modify it under the terms of the GNU Lesser General Public
13
 * License as published by the Free Software Foundation; either
14 b78e7197 Diego Biurrun
 * version 2.1 of the License, or (at your option) any later version.
15 de6d9b64 Fabrice Bellard
 *
16 b78e7197 Diego Biurrun
 * FFmpeg is distributed in the hope that it will be useful,
17 de6d9b64 Fabrice Bellard
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 19720f15 Fabrice Bellard
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19
 * Lesser General Public License for more details.
20 de6d9b64 Fabrice Bellard
 *
21 19720f15 Fabrice Bellard
 * You should have received a copy of the GNU Lesser General Public
22 b78e7197 Diego Biurrun
 * License along with FFmpeg; if not, write to the Free Software
23 5509bffa Diego Biurrun
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 de6d9b64 Fabrice Bellard
 */
25
#include "avformat.h"
26 0abdb293 Anton Khirnov
#include "avio_internal.h"
27 e94204df Aurelien Jacobs
#include "pcm.h"
28 9d9f4119 Måns Rullgård
#include "riff.h"
29 46a3d068 Fabrice Bellard
30 de6d9b64 Fabrice Bellard
typedef struct {
31 bc5c918e Diego Biurrun
    int64_t data;
32
    int64_t data_end;
33 d794d388 Michel Bardiaux
    int64_t minpts;
34
    int64_t maxpts;
35
    int last_duration;
36 740e89cf Daniel Verkamp
    int w64;
37 de6d9b64 Fabrice Bellard
} WAVContext;
38
39 b250f9c6 Aurelien Jacobs
#if CONFIG_WAV_MUXER
40 de6d9b64 Fabrice Bellard
static int wav_write_header(AVFormatContext *s)
41
{
42 c9a65ca8 Fabrice Bellard
    WAVContext *wav = s->priv_data;
43 ae628ec1 Anton Khirnov
    AVIOContext *pb = s->pb;
44 bc5c918e Diego Biurrun
    int64_t fmt, fact;
45 de6d9b64 Fabrice Bellard
46 0abdb293 Anton Khirnov
    ffio_wfourcc(pb, "RIFF");
47 77eb5504 Anton Khirnov
    avio_wl32(pb, 0); /* file length */
48 0abdb293 Anton Khirnov
    ffio_wfourcc(pb, "WAVE");
49 de6d9b64 Fabrice Bellard
50
    /* format header */
51 1a40491e Daniel Verkamp
    fmt = ff_start_tag(pb, "fmt ");
52
    if (ff_put_wav_header(pb, s->streams[0]->codec) < 0) {
53 5165651c Justin Ruggles
        av_log(s, AV_LOG_ERROR, "%s codec not supported in WAVE format\n",
54 f2d65a6c Michael Niedermayer
               s->streams[0]->codec->codec ? s->streams[0]->codec->codec->name : "NONE");
55 1ea4f593 Fabrice Bellard
        av_free(wav);
56 46a3d068 Fabrice Bellard
        return -1;
57
    }
58 1a40491e Daniel Verkamp
    ff_end_tag(pb, fmt);
59 de6d9b64 Fabrice Bellard
60 c5e86106 Diego Biurrun
    if (s->streams[0]->codec->codec_tag != 0x01 /* hence for all other than PCM */
61
        && !url_is_streamed(s->pb)) {
62 1a40491e Daniel Verkamp
        fact = ff_start_tag(pb, "fact");
63 77eb5504 Anton Khirnov
        avio_wl32(pb, 0);
64 1a40491e Daniel Verkamp
        ff_end_tag(pb, fact);
65 d794d388 Michel Bardiaux
    }
66
67 01f4895c Michael Niedermayer
    av_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
68 d794d388 Michel Bardiaux
    wav->maxpts = wav->last_duration = 0;
69
    wav->minpts = INT64_MAX;
70 a1e568bd Michael Niedermayer
71 de6d9b64 Fabrice Bellard
    /* data header */
72 1a40491e Daniel Verkamp
    wav->data = ff_start_tag(pb, "data");
73 115329f1 Diego Biurrun
74 de6d9b64 Fabrice Bellard
    put_flush_packet(pb);
75
76
    return 0;
77
}
78
79 e928649b Michael Niedermayer
static int wav_write_packet(AVFormatContext *s, AVPacket *pkt)
80 de6d9b64 Fabrice Bellard
{
81 ae628ec1 Anton Khirnov
    AVIOContext *pb  = s->pb;
82 c5e86106 Diego Biurrun
    WAVContext    *wav = s->priv_data;
83 77eb5504 Anton Khirnov
    avio_write(pb, pkt->data, pkt->size);
84 d794d388 Michel Bardiaux
    if(pkt->pts != AV_NOPTS_VALUE) {
85 c5e86106 Diego Biurrun
        wav->minpts        = FFMIN(wav->minpts, pkt->pts);
86
        wav->maxpts        = FFMAX(wav->maxpts, pkt->pts);
87 d794d388 Michel Bardiaux
        wav->last_duration = pkt->duration;
88
    } else
89
        av_log(s, AV_LOG_ERROR, "wav_write_packet: NOPTS\n");
90 de6d9b64 Fabrice Bellard
    return 0;
91
}
92
93
static int wav_write_trailer(AVFormatContext *s)
94
{
95 ae628ec1 Anton Khirnov
    AVIOContext *pb  = s->pb;
96 c5e86106 Diego Biurrun
    WAVContext    *wav = s->priv_data;
97 bc5c918e Diego Biurrun
    int64_t file_size;
98 de6d9b64 Fabrice Bellard
99 f0187d20 Baptiste Coudurier
    put_flush_packet(pb);
100
101 899681cd Björn Axelsson
    if (!url_is_streamed(s->pb)) {
102 1a40491e Daniel Verkamp
        ff_end_tag(pb, wav->data);
103 de6d9b64 Fabrice Bellard
104
        /* update file size */
105 a2704c97 Anton Khirnov
        file_size = avio_tell(pb);
106 6b4aa5da Anton Khirnov
        avio_seek(pb, 4, SEEK_SET);
107 77eb5504 Anton Khirnov
        avio_wl32(pb, (uint32_t)(file_size - 8));
108 6b4aa5da Anton Khirnov
        avio_seek(pb, file_size, SEEK_SET);
109 de6d9b64 Fabrice Bellard
110
        put_flush_packet(pb);
111 d794d388 Michel Bardiaux
112
        if(s->streams[0]->codec->codec_tag != 0x01) {
113
            /* Update num_samps in fact chunk */
114
            int number_of_samples;
115
            number_of_samples = av_rescale(wav->maxpts - wav->minpts + wav->last_duration,
116
                                           s->streams[0]->codec->sample_rate * (int64_t)s->streams[0]->time_base.num,
117
                                           s->streams[0]->time_base.den);
118 6b4aa5da Anton Khirnov
            avio_seek(pb, wav->data-12, SEEK_SET);
119 77eb5504 Anton Khirnov
            avio_wl32(pb, number_of_samples);
120 6b4aa5da Anton Khirnov
            avio_seek(pb, file_size, SEEK_SET);
121 d794d388 Michel Bardiaux
            put_flush_packet(pb);
122
        }
123 de6d9b64 Fabrice Bellard
    }
124
    return 0;
125
}
126 8f771e76 Diego Biurrun
127 c6610a21 Diego Elio Pettenò
AVOutputFormat ff_wav_muxer = {
128 8f771e76 Diego Biurrun
    "wav",
129
    NULL_IF_CONFIG_SMALL("WAV format"),
130
    "audio/x-wav",
131
    "wav",
132
    sizeof(WAVContext),
133
    CODEC_ID_PCM_S16LE,
134
    CODEC_ID_NONE,
135
    wav_write_header,
136
    wav_write_packet,
137
    wav_write_trailer,
138
    .codec_tag= (const AVCodecTag* const []){ff_codec_wav_tags, 0},
139
};
140 8212568a Diego Biurrun
#endif /* CONFIG_WAV_MUXER */
141 de6d9b64 Fabrice Bellard
142 8f771e76 Diego Biurrun
143
#if CONFIG_WAV_DEMUXER
144 724b1f6a Michael Niedermayer
145 ae628ec1 Anton Khirnov
static int64_t next_tag(AVIOContext *pb, unsigned int *tag)
146 724b1f6a Michael Niedermayer
{
147 b7effd4e Anton Khirnov
    *tag = avio_rl32(pb);
148
    return avio_rl32(pb);
149 724b1f6a Michael Niedermayer
}
150
151 de6d9b64 Fabrice Bellard
/* return the size of the found tag */
152 ae628ec1 Anton Khirnov
static int64_t find_tag(AVIOContext *pb, uint32_t tag1)
153 de6d9b64 Fabrice Bellard
{
154
    unsigned int tag;
155 502d6c0a Baptiste Coudurier
    int64_t size;
156 de6d9b64 Fabrice Bellard
157 c5e86106 Diego Biurrun
    for (;;) {
158 de6d9b64 Fabrice Bellard
        if (url_feof(pb))
159
            return -1;
160 724b1f6a Michael Niedermayer
        size = next_tag(pb, &tag);
161 de6d9b64 Fabrice Bellard
        if (tag == tag1)
162
            break;
163 6b4aa5da Anton Khirnov
        avio_seek(pb, size, SEEK_CUR);
164 de6d9b64 Fabrice Bellard
    }
165
    return size;
166
}
167
168 c9a65ca8 Fabrice Bellard
static int wav_probe(AVProbeData *p)
169
{
170
    /* check file header */
171
    if (p->buf_size <= 32)
172
        return 0;
173 811e0fc2 Daniel Verkamp
    if (!memcmp(p->buf + 8, "WAVE", 4)) {
174
        if (!memcmp(p->buf, "RIFF", 4))
175 70d8c762 Daniel Verkamp
            /*
176
              Since ACT demuxer has standard WAV header at top of it's own,
177
              returning score is decreased to avoid probe conflict
178
              between ACT and WAV.
179
            */
180
            return AVPROBE_SCORE_MAX - 1;
181 811e0fc2 Daniel Verkamp
        else if (!memcmp(p->buf,      "RF64", 4) &&
182
                 !memcmp(p->buf + 12, "ds64", 4))
183
            return AVPROBE_SCORE_MAX;
184
    }
185 70d8c762 Daniel Verkamp
    return 0;
186 c9a65ca8 Fabrice Bellard
}
187
188 de6d9b64 Fabrice Bellard
/* wav input */
189
static int wav_read_header(AVFormatContext *s,
190
                           AVFormatParameters *ap)
191
{
192 811e0fc2 Daniel Verkamp
    int64_t size, av_uninit(data_size);
193 462b2620 Michael Niedermayer
    int64_t sample_count=0;
194 811e0fc2 Daniel Verkamp
    int rf64;
195 de6d9b64 Fabrice Bellard
    unsigned int tag;
196 ae628ec1 Anton Khirnov
    AVIOContext *pb = s->pb;
197 de6d9b64 Fabrice Bellard
    AVStream *st;
198 b582d7ba Michael Niedermayer
    WAVContext *wav = s->priv_data;
199 de6d9b64 Fabrice Bellard
200
    /* check RIFF header */
201 b7effd4e Anton Khirnov
    tag = avio_rl32(pb);
202 de6d9b64 Fabrice Bellard
203 811e0fc2 Daniel Verkamp
    rf64 = tag == MKTAG('R', 'F', '6', '4');
204
    if (!rf64 && tag != MKTAG('R', 'I', 'F', 'F'))
205 de6d9b64 Fabrice Bellard
        return -1;
206 b7effd4e Anton Khirnov
    avio_rl32(pb); /* file size */
207
    tag = avio_rl32(pb);
208 de6d9b64 Fabrice Bellard
    if (tag != MKTAG('W', 'A', 'V', 'E'))
209
        return -1;
210 115329f1 Diego Biurrun
211 811e0fc2 Daniel Verkamp
    if (rf64) {
212 b7effd4e Anton Khirnov
        if (avio_rl32(pb) != MKTAG('d', 's', '6', '4'))
213 811e0fc2 Daniel Verkamp
            return -1;
214 b7effd4e Anton Khirnov
        size = avio_rl32(pb);
215 811e0fc2 Daniel Verkamp
        if (size < 16)
216
            return -1;
217 b7effd4e Anton Khirnov
        avio_rl64(pb); /* RIFF size */
218
        data_size = avio_rl64(pb);
219
        sample_count = avio_rl64(pb);
220 e356fc57 Anton Khirnov
        avio_seek(pb, size - 16, SEEK_CUR); /* skip rest of ds64 chunk */
221 811e0fc2 Daniel Verkamp
    }
222
223 de6d9b64 Fabrice Bellard
    /* parse fmt header */
224
    size = find_tag(pb, MKTAG('f', 'm', 't', ' '));
225
    if (size < 0)
226
        return -1;
227 c9a65ca8 Fabrice Bellard
    st = av_new_stream(s, 0);
228 de6d9b64 Fabrice Bellard
    if (!st)
229 769e10f0 Panagiotis Issaris
        return AVERROR(ENOMEM);
230 de6d9b64 Fabrice Bellard
231 1a40491e Daniel Verkamp
    ff_get_wav_header(pb, st->codec, size);
232 57004ff1 Aurelien Jacobs
    st->need_parsing = AVSTREAM_PARSE_FULL;
233 595bf4ef Michael Niedermayer
234 01f4895c Michael Niedermayer
    av_set_pts_info(st, 64, 1, st->codec->sample_rate);
235 595bf4ef Michael Niedermayer
236 f9329946 Michael Niedermayer
    for (;;) {
237
        if (url_feof(pb))
238
            return -1;
239
        size = next_tag(pb, &tag);
240
        if (tag == MKTAG('d', 'a', 't', 'a')){
241
            break;
242
        }else if (tag == MKTAG('f','a','c','t') && !sample_count){
243 b7effd4e Anton Khirnov
            sample_count = avio_rl32(pb);
244 f9329946 Michael Niedermayer
            size -= 4;
245
        }
246 6b4aa5da Anton Khirnov
        avio_seek(pb, size, SEEK_CUR);
247 f9329946 Michael Niedermayer
    }
248 811e0fc2 Daniel Verkamp
    if (rf64)
249
        size = data_size;
250 e095026a Fabrice Bellard
    if (size < 0)
251
        return -1;
252 b7e0f88f Daniel Verkamp
    if (!size) {
253
        wav->data_end = INT64_MAX;
254
    } else
255 a2704c97 Anton Khirnov
        wav->data_end= avio_tell(pb) + size;
256 462b2620 Michael Niedermayer
257
    if (!sample_count && st->codec->channels && av_get_bits_per_sample(st->codec->codec_id))
258
        sample_count = (size<<3) / (st->codec->channels * (uint64_t)av_get_bits_per_sample(st->codec->codec_id));
259
    if (sample_count)
260
        st->duration = sample_count;
261 de6d9b64 Fabrice Bellard
    return 0;
262
}
263
264 738914be Diego Biurrun
/** Find chunk with w64 GUID by skipping over other chunks
265
 * @return the size of the found chunk
266
 */
267 ae628ec1 Anton Khirnov
static int64_t find_guid(AVIOContext *pb, const uint8_t guid1[16])
268 738914be Diego Biurrun
{
269
    uint8_t guid[16];
270
    int64_t size;
271
272
    while (!url_feof(pb)) {
273 b7effd4e Anton Khirnov
        avio_read(pb, guid, 16);
274
        size = avio_rl64(pb);
275 738914be Diego Biurrun
        if (size <= 24)
276
            return -1;
277
        if (!memcmp(guid, guid1, 16))
278
            return size;
279 e356fc57 Anton Khirnov
        avio_seek(pb, FFALIGN(size, INT64_C(8)) - 24, SEEK_CUR);
280 738914be Diego Biurrun
    }
281
    return -1;
282
}
283
284
static const uint8_t guid_data[16] = { 'd', 'a', 't', 'a',
285
    0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A };
286
287 de6d9b64 Fabrice Bellard
#define MAX_SIZE 4096
288
289
static int wav_read_packet(AVFormatContext *s,
290
                           AVPacket *pkt)
291
{
292 740e89cf Daniel Verkamp
    int ret, size;
293
    int64_t left;
294 f9b5459e Fabrice Bellard
    AVStream *st;
295 b582d7ba Michael Niedermayer
    WAVContext *wav = s->priv_data;
296 de6d9b64 Fabrice Bellard
297 f9b5459e Fabrice Bellard
    st = s->streams[0];
298
299 a2704c97 Anton Khirnov
    left = wav->data_end - avio_tell(s->pb);
300 c5e86106 Diego Biurrun
    if (left <= 0){
301
        if (CONFIG_W64_DEMUXER && wav->w64)
302 740e89cf Daniel Verkamp
            left = find_guid(s->pb, guid_data) - 24;
303 c5e86106 Diego Biurrun
        else
304
            left = find_tag(s->pb, MKTAG('d', 'a', 't', 'a'));
305
        if (left < 0)
306 3fcb5113 Reimar Döffinger
            return AVERROR_EOF;
307 a2704c97 Anton Khirnov
        wav->data_end= avio_tell(s->pb) + left;
308 b582d7ba Michael Niedermayer
    }
309
310 f9b5459e Fabrice Bellard
    size = MAX_SIZE;
311 01f4895c Michael Niedermayer
    if (st->codec->block_align > 1) {
312
        if (size < st->codec->block_align)
313
            size = st->codec->block_align;
314
        size = (size / st->codec->block_align) * st->codec->block_align;
315 f9b5459e Fabrice Bellard
    }
316 c5e86106 Diego Biurrun
    size = FFMIN(size, left);
317
    ret  = av_get_packet(s->pb, pkt, size);
318 e581b628 Reimar Döffinger
    if (ret < 0)
319
        return ret;
320 de6d9b64 Fabrice Bellard
    pkt->stream_index = 0;
321
322
    return ret;
323
}
324
325 115329f1 Diego Biurrun
static int wav_read_seek(AVFormatContext *s,
326 7b3c1382 Michael Niedermayer
                         int stream_index, int64_t timestamp, int flags)
327 f9b5459e Fabrice Bellard
{
328
    AVStream *st;
329
330
    st = s->streams[0];
331 c5e86106 Diego Biurrun
    switch (st->codec->codec_id) {
332 f9b5459e Fabrice Bellard
    case CODEC_ID_MP2:
333
    case CODEC_ID_MP3:
334
    case CODEC_ID_AC3:
335 23c99253 Michael Niedermayer
    case CODEC_ID_DTS:
336 f9b5459e Fabrice Bellard
        /* use generic seeking with dynamically generated indexes */
337
        return -1;
338
    default:
339
        break;
340
    }
341 7b3c1382 Michael Niedermayer
    return pcm_read_seek(s, stream_index, timestamp, flags);
342 f9b5459e Fabrice Bellard
}
343
344 c6610a21 Diego Elio Pettenò
AVInputFormat ff_wav_demuxer = {
345 c9a65ca8 Fabrice Bellard
    "wav",
346 bde15e74 Stefano Sabatini
    NULL_IF_CONFIG_SMALL("WAV format"),
347 b582d7ba Michael Niedermayer
    sizeof(WAVContext),
348 c9a65ca8 Fabrice Bellard
    wav_probe,
349
    wav_read_header,
350
    wav_read_packet,
351 9b64a036 Baptiste Coudurier
    NULL,
352 f9b5459e Fabrice Bellard
    wav_read_seek,
353 e9b78eeb Michael Niedermayer
    .flags= AVFMT_GENERIC_INDEX,
354 1a40491e Daniel Verkamp
    .codec_tag= (const AVCodecTag* const []){ff_codec_wav_tags, 0},
355 c9a65ca8 Fabrice Bellard
};
356 8f771e76 Diego Biurrun
#endif /* CONFIG_WAV_DEMUXER */
357 c5e86106 Diego Biurrun
358
359 740e89cf Daniel Verkamp
#if CONFIG_W64_DEMUXER
360 8f771e76 Diego Biurrun
static const uint8_t guid_riff[16] = { 'r', 'i', 'f', 'f',
361
    0x2E, 0x91, 0xCF, 0x11, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 };
362
363
static const uint8_t guid_wave[16] = { 'w', 'a', 'v', 'e',
364
    0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A };
365
366
static const uint8_t guid_fmt [16] = { 'f', 'm', 't', ' ',
367
    0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A };
368
369
static int w64_probe(AVProbeData *p)
370
{
371
    if (p->buf_size <= 40)
372
        return 0;
373
    if (!memcmp(p->buf,      guid_riff, 16) &&
374
        !memcmp(p->buf + 24, guid_wave, 16))
375
        return AVPROBE_SCORE_MAX;
376
    else
377
        return 0;
378
}
379
380
static int w64_read_header(AVFormatContext *s, AVFormatParameters *ap)
381
{
382
    int64_t size;
383 ae628ec1 Anton Khirnov
    AVIOContext *pb  = s->pb;
384 8f771e76 Diego Biurrun
    WAVContext    *wav = s->priv_data;
385
    AVStream *st;
386
    uint8_t guid[16];
387
388 b7effd4e Anton Khirnov
    avio_read(pb, guid, 16);
389 8f771e76 Diego Biurrun
    if (memcmp(guid, guid_riff, 16))
390
        return -1;
391
392 b7effd4e Anton Khirnov
    if (avio_rl64(pb) < 16 + 8 + 16 + 8 + 16 + 8) /* riff + wave + fmt + sizes */
393 8f771e76 Diego Biurrun
        return -1;
394
395 b7effd4e Anton Khirnov
    avio_read(pb, guid, 16);
396 8f771e76 Diego Biurrun
    if (memcmp(guid, guid_wave, 16)) {
397
        av_log(s, AV_LOG_ERROR, "could not find wave guid\n");
398
        return -1;
399
    }
400
401
    size = find_guid(pb, guid_fmt);
402
    if (size < 0) {
403
        av_log(s, AV_LOG_ERROR, "could not find fmt guid\n");
404
        return -1;
405
    }
406
407
    st = av_new_stream(s, 0);
408
    if (!st)
409
        return AVERROR(ENOMEM);
410
411
    /* subtract chunk header size - normal wav file doesn't count it */
412
    ff_get_wav_header(pb, st->codec, size - 24);
413 e356fc57 Anton Khirnov
    avio_seek(pb, FFALIGN(size, INT64_C(8)) - size, SEEK_CUR);
414 8f771e76 Diego Biurrun
415
    st->need_parsing = AVSTREAM_PARSE_FULL;
416
417
    av_set_pts_info(st, 64, 1, st->codec->sample_rate);
418
419
    size = find_guid(pb, guid_data);
420
    if (size < 0) {
421
        av_log(s, AV_LOG_ERROR, "could not find data guid\n");
422
        return -1;
423
    }
424 a2704c97 Anton Khirnov
    wav->data_end = avio_tell(pb) + size - 24;
425 8f771e76 Diego Biurrun
    wav->w64      = 1;
426
427
    return 0;
428
}
429
430 c6610a21 Diego Elio Pettenò
AVInputFormat ff_w64_demuxer = {
431 740e89cf Daniel Verkamp
    "w64",
432
    NULL_IF_CONFIG_SMALL("Sony Wave64 format"),
433
    sizeof(WAVContext),
434
    w64_probe,
435
    w64_read_header,
436
    wav_read_packet,
437
    NULL,
438
    wav_read_seek,
439
    .flags = AVFMT_GENERIC_INDEX,
440
    .codec_tag = (const AVCodecTag* const []){ff_codec_wav_tags, 0},
441
};
442 8f771e76 Diego Biurrun
#endif /* CONFIG_W64_DEMUXER */