2 * WAV muxer and demuxer
3 * Copyright (c) 2001, 2002 Fabrice Bellard
7 * Copyright (c) 2009 Daniel Verkamp
9 * This file is part of FFmpeg.
11 * FFmpeg is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
16 * FFmpeg is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with FFmpeg; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 #include "libavutil/avassert.h"
27 #include "libavutil/dict.h"
28 #include "libavutil/log.h"
29 #include "libavutil/mathematics.h"
30 #include "libavutil/opt.h"
33 #include "avio_internal.h"
50 int smv_frames_per_jpeg;
59 static inline void bwf_write_bext_string(AVFormatContext *s, const char *key, int maxlen)
61 AVDictionaryEntry *tag;
64 if (tag = av_dict_get(s->metadata, key, NULL, 0)) {
65 len = strlen(tag->value);
66 len = FFMIN(len, maxlen);
67 avio_write(s->pb, tag->value, len);
70 ffio_fill(s->pb, 0, maxlen - len);
73 static void bwf_write_bext_chunk(AVFormatContext *s)
75 AVDictionaryEntry *tmp_tag;
76 uint64_t time_reference = 0;
77 int64_t bext = ff_start_tag(s->pb, "bext");
79 bwf_write_bext_string(s, "description", 256);
80 bwf_write_bext_string(s, "originator", 32);
81 bwf_write_bext_string(s, "originator_reference", 32);
82 bwf_write_bext_string(s, "origination_date", 10);
83 bwf_write_bext_string(s, "origination_time", 8);
85 if (tmp_tag = av_dict_get(s->metadata, "time_reference", NULL, 0))
86 time_reference = strtoll(tmp_tag->value, NULL, 10);
87 avio_wl64(s->pb, time_reference);
88 avio_wl16(s->pb, 1); // set version to 1
90 if (tmp_tag = av_dict_get(s->metadata, "umid", NULL, 0)) {
91 unsigned char umidpart_str[17] = {0};
94 int len = strlen(tmp_tag->value+2);
96 for (i = 0; i < len/16; i++) {
97 memcpy(umidpart_str, tmp_tag->value + 2 + (i*16), 16);
98 umidpart = strtoll(umidpart_str, NULL, 16);
99 avio_wb64(s->pb, umidpart);
101 ffio_fill(s->pb, 0, 64 - i*8);
103 ffio_fill(s->pb, 0, 64); // zero UMID
105 ffio_fill(s->pb, 0, 190); // Reserved
107 if (tmp_tag = av_dict_get(s->metadata, "coding_history", NULL, 0))
108 avio_put_str(s->pb, tmp_tag->value);
110 ff_end_tag(s->pb, bext);
113 static int wav_write_header(AVFormatContext *s)
115 WAVContext *wav = s->priv_data;
116 AVIOContext *pb = s->pb;
119 ffio_wfourcc(pb, "RIFF");
120 avio_wl32(pb, 0); /* file length */
121 ffio_wfourcc(pb, "WAVE");
124 fmt = ff_start_tag(pb, "fmt ");
125 if (ff_put_wav_header(pb, s->streams[0]->codec) < 0) {
126 av_log(s, AV_LOG_ERROR, "%s codec not supported in WAVE format\n",
127 s->streams[0]->codec->codec ? s->streams[0]->codec->codec->name : "NONE");
132 if (s->streams[0]->codec->codec_tag != 0x01 /* hence for all other than PCM */
133 && s->pb->seekable) {
134 fact = ff_start_tag(pb, "fact");
136 ff_end_tag(pb, fact);
140 bwf_write_bext_chunk(s);
142 avpriv_set_pts_info(s->streams[0], 64, 1, s->streams[0]->codec->sample_rate);
143 wav->maxpts = wav->last_duration = 0;
144 wav->minpts = INT64_MAX;
147 wav->data = ff_start_tag(pb, "data");
154 static int wav_write_packet(AVFormatContext *s, AVPacket *pkt)
156 AVIOContext *pb = s->pb;
157 WAVContext *wav = s->priv_data;
158 avio_write(pb, pkt->data, pkt->size);
159 if(pkt->pts != AV_NOPTS_VALUE) {
160 wav->minpts = FFMIN(wav->minpts, pkt->pts);
161 wav->maxpts = FFMAX(wav->maxpts, pkt->pts);
162 wav->last_duration = pkt->duration;
164 av_log(s, AV_LOG_ERROR, "wav_write_packet: NOPTS\n");
168 static int wav_write_trailer(AVFormatContext *s)
170 AVIOContext *pb = s->pb;
171 WAVContext *wav = s->priv_data;
176 if (s->pb->seekable) {
177 ff_end_tag(pb, wav->data);
179 /* update file size */
180 file_size = avio_tell(pb);
181 avio_seek(pb, 4, SEEK_SET);
182 avio_wl32(pb, (uint32_t)(file_size - 8));
183 avio_seek(pb, file_size, SEEK_SET);
187 if(s->streams[0]->codec->codec_tag != 0x01) {
188 /* Update num_samps in fact chunk */
189 int number_of_samples;
190 number_of_samples = av_rescale(wav->maxpts - wav->minpts + wav->last_duration,
191 s->streams[0]->codec->sample_rate * (int64_t)s->streams[0]->time_base.num,
192 s->streams[0]->time_base.den);
193 avio_seek(pb, wav->data-12, SEEK_SET);
194 avio_wl32(pb, number_of_samples);
195 avio_seek(pb, file_size, SEEK_SET);
202 #define OFFSET(x) offsetof(WAVContext, x)
203 #define ENC AV_OPT_FLAG_ENCODING_PARAM
204 static const AVOption options[] = {
205 { "write_bext", "Write BEXT chunk.", OFFSET(write_bext), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, ENC },
209 static const AVClass wav_muxer_class = {
210 .class_name = "WAV muxer",
211 .item_name = av_default_item_name,
213 .version = LIBAVUTIL_VERSION_INT,
216 AVOutputFormat ff_wav_muxer = {
218 .long_name = NULL_IF_CONFIG_SMALL("WAV / WAVE (Waveform Audio)"),
219 .mime_type = "audio/x-wav",
221 .priv_data_size = sizeof(WAVContext),
222 .audio_codec = AV_CODEC_ID_PCM_S16LE,
223 .video_codec = AV_CODEC_ID_NONE,
224 .write_header = wav_write_header,
225 .write_packet = wav_write_packet,
226 .write_trailer = wav_write_trailer,
227 .flags = AVFMT_TS_NONSTRICT,
228 .codec_tag = (const AVCodecTag* const []){ ff_codec_wav_tags, 0 },
229 .priv_class = &wav_muxer_class,
231 #endif /* CONFIG_WAV_MUXER */
234 #if CONFIG_WAV_DEMUXER
236 static int64_t next_tag(AVIOContext *pb, uint32_t *tag)
238 *tag = avio_rl32(pb);
239 return avio_rl32(pb);
242 /* return the size of the found tag */
243 static int64_t find_tag(AVIOContext *pb, uint32_t tag1)
251 size = next_tag(pb, &tag);
259 static int wav_probe(AVProbeData *p)
261 /* check file header */
262 if (p->buf_size <= 32)
264 if (!memcmp(p->buf + 8, "WAVE", 4)) {
265 if (!memcmp(p->buf, "RIFF", 4))
267 Since ACT demuxer has standard WAV header at top of it's own,
268 returning score is decreased to avoid probe conflict
271 return AVPROBE_SCORE_MAX - 1;
272 else if (!memcmp(p->buf, "RF64", 4) &&
273 !memcmp(p->buf + 12, "ds64", 4))
274 return AVPROBE_SCORE_MAX;
279 static void handle_stream_probing(AVStream *st)
281 if (st->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {
282 st->request_probe = AVPROBE_SCORE_MAX/2;
283 st->probe_packets = FFMIN(st->probe_packets, 4);
287 static int wav_parse_fmt_tag(AVFormatContext *s, int64_t size, AVStream **st)
289 AVIOContext *pb = s->pb;
292 /* parse fmt header */
293 *st = avformat_new_stream(s, NULL);
295 return AVERROR(ENOMEM);
297 ret = ff_get_wav_header(pb, (*st)->codec, size);
300 handle_stream_probing(*st);
302 (*st)->need_parsing = AVSTREAM_PARSE_FULL_RAW;
304 avpriv_set_pts_info(*st, 64, 1, (*st)->codec->sample_rate);
309 static inline int wav_parse_bext_string(AVFormatContext *s, const char *key,
315 av_assert0(length <= sizeof(temp));
316 if ((ret = avio_read(s->pb, temp, length)) < 0)
322 return av_dict_set(&s->metadata, key, temp, 0);
327 static int wav_parse_bext_tag(AVFormatContext *s, int64_t size)
329 char temp[131], *coding_history;
331 uint64_t time_reference;
332 int64_t umid_parts[8], umid_mask = 0;
334 if ((ret = wav_parse_bext_string(s, "description", 256)) < 0 ||
335 (ret = wav_parse_bext_string(s, "originator", 32)) < 0 ||
336 (ret = wav_parse_bext_string(s, "originator_reference", 32)) < 0 ||
337 (ret = wav_parse_bext_string(s, "origination_date", 10)) < 0 ||
338 (ret = wav_parse_bext_string(s, "origination_time", 8)) < 0)
341 time_reference = avio_rl64(s->pb);
342 snprintf(temp, sizeof(temp), "%"PRIu64, time_reference);
343 if ((ret = av_dict_set(&s->metadata, "time_reference", temp, 0)) < 0)
346 /* check if version is >= 1, in which case an UMID may be present */
347 if (avio_rl16(s->pb) >= 1) {
348 for (x = 0; x < 8; x++)
349 umid_mask |= umid_parts[x] = avio_rb64(s->pb);
352 /* the string formatting below is per SMPTE 330M-2004 Annex C */
353 if (umid_parts[4] == 0 && umid_parts[5] == 0 && umid_parts[6] == 0 && umid_parts[7] == 0) {
355 snprintf(temp, sizeof(temp), "0x%016"PRIX64"%016"PRIX64"%016"PRIX64"%016"PRIX64,
356 umid_parts[0], umid_parts[1], umid_parts[2], umid_parts[3]);
359 snprintf(temp, sizeof(temp), "0x%016"PRIX64"%016"PRIX64"%016"PRIX64"%016"PRIX64
360 "%016"PRIX64"%016"PRIX64"%016"PRIX64"%016"PRIX64,
361 umid_parts[0], umid_parts[1], umid_parts[2], umid_parts[3],
362 umid_parts[4], umid_parts[5], umid_parts[6], umid_parts[7]);
365 if ((ret = av_dict_set(&s->metadata, "umid", temp, 0)) < 0)
369 avio_skip(s->pb, 190);
371 avio_skip(s->pb, 254);
374 /* CodingHistory present */
377 if (!(coding_history = av_malloc(size+1)))
378 return AVERROR(ENOMEM);
380 if ((ret = avio_read(s->pb, coding_history, size)) < 0)
383 coding_history[size] = 0;
384 if ((ret = av_dict_set(&s->metadata, "coding_history", coding_history,
385 AV_DICT_DONT_STRDUP_VAL)) < 0)
392 static const AVMetadataConv wav_metadata_conv[] = {
393 {"description", "comment" },
394 {"originator", "encoded_by" },
395 {"origination_date", "date" },
396 {"origination_time", "creation_time"},
401 static int wav_read_header(AVFormatContext *s)
403 int64_t size, av_uninit(data_size);
404 int64_t sample_count=0;
406 uint32_t tag, list_type;
407 AVIOContext *pb = s->pb;
409 WAVContext *wav = s->priv_data;
410 int ret, got_fmt = 0;
411 int64_t next_tag_ofs, data_ofs = -1;
413 wav->smv_data_ofs = -1;
415 /* check RIFF header */
418 rf64 = tag == MKTAG('R', 'F', '6', '4');
419 if (!rf64 && tag != MKTAG('R', 'I', 'F', 'F'))
421 avio_rl32(pb); /* file size */
423 if (tag != MKTAG('W', 'A', 'V', 'E'))
427 if (avio_rl32(pb) != MKTAG('d', 's', '6', '4'))
429 size = avio_rl32(pb);
432 avio_rl64(pb); /* RIFF size */
433 data_size = avio_rl64(pb);
434 sample_count = avio_rl64(pb);
435 if (data_size < 0 || sample_count < 0) {
436 av_log(s, AV_LOG_ERROR, "negative data_size and/or sample_count in "
437 "ds64: data_size = %"PRId64", sample_count = %"PRId64"\n",
438 data_size, sample_count);
439 return AVERROR_INVALIDDATA;
441 avio_skip(pb, size - 24); /* skip rest of ds64 chunk */
447 size = next_tag(pb, &tag);
448 next_tag_ofs = avio_tell(pb) + size;
454 case MKTAG('f', 'm', 't', ' '):
455 /* only parse the first 'fmt ' tag found */
456 if (!got_fmt && (ret = wav_parse_fmt_tag(s, size, &st)) < 0) {
459 av_log(s, AV_LOG_WARNING, "found more than one 'fmt ' tag\n");
463 case MKTAG('d', 'a', 't', 'a'):
465 av_log(s, AV_LOG_ERROR, "found no 'fmt ' tag before the 'data' tag\n");
466 return AVERROR_INVALIDDATA;
470 next_tag_ofs = wav->data_end = avio_tell(pb) + data_size;
473 next_tag_ofs = wav->data_end = size ? next_tag_ofs : INT64_MAX;
476 data_ofs = avio_tell(pb);
478 /* don't look for footer metadata if we can't seek or if we don't
479 * know where the data tag ends
481 if (!pb->seekable || (!rf64 && !size))
484 case MKTAG('f','a','c','t'):
486 sample_count = avio_rl32(pb);
488 case MKTAG('b','e','x','t'):
489 if ((ret = wav_parse_bext_tag(s, size)) < 0)
492 case MKTAG('S','M','V','0'):
494 av_log(s, AV_LOG_ERROR, "found no 'fmt ' tag before the 'SMV0' tag\n");
495 return AVERROR_INVALIDDATA;
497 // SMV file, a wav file with video appended.
498 if (size != MKTAG('0','2','0','0')) {
499 av_log(s, AV_LOG_ERROR, "Unknown SMV version found\n");
502 av_log(s, AV_LOG_DEBUG, "Found SMV data\n");
503 vst = avformat_new_stream(s, NULL);
505 return AVERROR(ENOMEM);
508 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
509 vst->codec->codec_id = AV_CODEC_ID_MJPEG;
510 vst->codec->width = avio_rl24(pb);
511 vst->codec->height = avio_rl24(pb);
512 size = avio_rl24(pb);
513 wav->smv_data_ofs = avio_tell(pb) + (size - 5) * 3;
515 wav->smv_block_size = avio_rl24(pb);
516 avpriv_set_pts_info(vst, 32, 1, avio_rl24(pb));
517 vst->duration = avio_rl24(pb);
520 wav->smv_frames_per_jpeg = avio_rl24(pb);
522 case MKTAG('L', 'I', 'S', 'T'):
523 list_type = avio_rl32(pb);
525 av_log(s, AV_LOG_ERROR, "too short LIST tag\n");
526 return AVERROR_INVALIDDATA;
529 case MKTAG('I', 'N', 'F', 'O'):
530 if ((ret = ff_read_riff_info(s, size - 4)) < 0)
536 /* seek to next tag unless we know that we'll run into EOF */
537 if ((avio_size(pb) > 0 && next_tag_ofs >= avio_size(pb)) ||
538 avio_seek(pb, next_tag_ofs, SEEK_SET) < 0) {
544 av_log(s, AV_LOG_ERROR, "no 'data' tag found\n");
545 return AVERROR_INVALIDDATA;
548 avio_seek(pb, data_ofs, SEEK_SET);
550 if (!sample_count && st->codec->channels && av_get_bits_per_sample(st->codec->codec_id))
551 sample_count = (data_size<<3) / (st->codec->channels * (uint64_t)av_get_bits_per_sample(st->codec->codec_id));
553 st->duration = sample_count;
555 ff_metadata_conv_ctx(s, NULL, wav_metadata_conv);
556 ff_metadata_conv_ctx(s, NULL, ff_riff_info_conv);
561 /** Find chunk with w64 GUID by skipping over other chunks
562 * @return the size of the found chunk
564 static int64_t find_guid(AVIOContext *pb, const uint8_t guid1[16])
569 while (!url_feof(pb)) {
570 avio_read(pb, guid, 16);
571 size = avio_rl64(pb);
574 if (!memcmp(guid, guid1, 16))
576 avio_skip(pb, FFALIGN(size, INT64_C(8)) - 24);
581 static const uint8_t guid_data[16] = { 'd', 'a', 't', 'a',
582 0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A };
584 #define MAX_SIZE 4096
586 static int wav_read_packet(AVFormatContext *s,
592 WAVContext *wav = s->priv_data;
594 if (wav->smv_data_ofs > 0) {
595 int64_t audio_dts, video_dts;
597 audio_dts = s->streams[0]->cur_dts;
598 video_dts = s->streams[1]->cur_dts;
599 if (audio_dts != AV_NOPTS_VALUE && video_dts != AV_NOPTS_VALUE) {
600 audio_dts = av_rescale_q(audio_dts, s->streams[0]->time_base, AV_TIME_BASE_Q);
601 video_dts = av_rescale_q(video_dts, s->streams[1]->time_base, AV_TIME_BASE_Q);
602 wav->smv_last_stream = video_dts >= audio_dts;
604 wav->smv_last_stream = !wav->smv_last_stream;
605 wav->smv_last_stream |= wav->audio_eof;
606 wav->smv_last_stream &= !wav->smv_eof;
607 if (wav->smv_last_stream) {
608 uint64_t old_pos = avio_tell(s->pb);
609 uint64_t new_pos = wav->smv_data_ofs +
610 wav->smv_block * wav->smv_block_size;
611 if (avio_seek(s->pb, new_pos, SEEK_SET) < 0) {
615 size = avio_rl24(s->pb);
616 ret = av_get_packet(s->pb, pkt, size);
620 pkt->pts = wav->smv_block * wav->smv_frames_per_jpeg;
622 pkt->stream_index = 1;
624 avio_seek(s->pb, old_pos, SEEK_SET);
625 if (ret == AVERROR_EOF) {
635 left = wav->data_end - avio_tell(s->pb);
636 if (wav->ignore_length)
639 if (CONFIG_W64_DEMUXER && wav->w64)
640 left = find_guid(s->pb, guid_data) - 24;
642 left = find_tag(s->pb, MKTAG('d', 'a', 't', 'a'));
645 if (wav->smv_data_ofs > 0 && !wav->smv_eof)
649 wav->data_end= avio_tell(s->pb) + left;
653 if (st->codec->block_align > 1) {
654 if (size < st->codec->block_align)
655 size = st->codec->block_align;
656 size = (size / st->codec->block_align) * st->codec->block_align;
658 size = FFMIN(size, left);
659 ret = av_get_packet(s->pb, pkt, size);
662 pkt->stream_index = 0;
667 static int wav_read_seek(AVFormatContext *s,
668 int stream_index, int64_t timestamp, int flags)
670 WAVContext *wav = s->priv_data;
674 if (wav->smv_data_ofs > 0) {
675 int64_t smv_timestamp = timestamp;
676 if (stream_index == 0)
677 smv_timestamp = av_rescale_q(timestamp, s->streams[0]->time_base, s->streams[1]->time_base);
679 timestamp = av_rescale_q(smv_timestamp, s->streams[1]->time_base, s->streams[0]->time_base);
680 wav->smv_block = smv_timestamp / wav->smv_frames_per_jpeg;
684 switch (st->codec->codec_id) {
685 case AV_CODEC_ID_MP2:
686 case AV_CODEC_ID_MP3:
687 case AV_CODEC_ID_AC3:
688 case AV_CODEC_ID_DTS:
689 /* use generic seeking with dynamically generated indexes */
694 return ff_pcm_read_seek(s, stream_index, timestamp, flags);
697 #define OFFSET(x) offsetof(WAVContext, x)
698 #define DEC AV_OPT_FLAG_DECODING_PARAM
699 static const AVOption demux_options[] = {
700 { "ignore_length", "Ignore length", OFFSET(ignore_length), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, DEC },
704 static const AVClass wav_demuxer_class = {
705 .class_name = "WAV demuxer",
706 .item_name = av_default_item_name,
707 .option = demux_options,
708 .version = LIBAVUTIL_VERSION_INT,
710 AVInputFormat ff_wav_demuxer = {
712 .long_name = NULL_IF_CONFIG_SMALL("WAV / WAVE (Waveform Audio)"),
713 .priv_data_size = sizeof(WAVContext),
714 .read_probe = wav_probe,
715 .read_header = wav_read_header,
716 .read_packet = wav_read_packet,
717 .read_seek = wav_read_seek,
718 .flags = AVFMT_GENERIC_INDEX,
719 .codec_tag = (const AVCodecTag* const []){ ff_codec_wav_tags, 0 },
720 .priv_class = &wav_demuxer_class,
722 #endif /* CONFIG_WAV_DEMUXER */
725 #if CONFIG_W64_DEMUXER
726 static const uint8_t guid_riff[16] = { 'r', 'i', 'f', 'f',
727 0x2E, 0x91, 0xCF, 0x11, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 };
729 static const uint8_t guid_wave[16] = { 'w', 'a', 'v', 'e',
730 0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A };
732 static const uint8_t guid_fmt [16] = { 'f', 'm', 't', ' ',
733 0xF3, 0xAC, 0xD3, 0x11, 0x8C, 0xD1, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A };
735 static int w64_probe(AVProbeData *p)
737 if (p->buf_size <= 40)
739 if (!memcmp(p->buf, guid_riff, 16) &&
740 !memcmp(p->buf + 24, guid_wave, 16))
741 return AVPROBE_SCORE_MAX;
746 static int w64_read_header(AVFormatContext *s)
749 AVIOContext *pb = s->pb;
750 WAVContext *wav = s->priv_data;
755 avio_read(pb, guid, 16);
756 if (memcmp(guid, guid_riff, 16))
759 if (avio_rl64(pb) < 16 + 8 + 16 + 8 + 16 + 8) /* riff + wave + fmt + sizes */
762 avio_read(pb, guid, 16);
763 if (memcmp(guid, guid_wave, 16)) {
764 av_log(s, AV_LOG_ERROR, "could not find wave guid\n");
768 size = find_guid(pb, guid_fmt);
770 av_log(s, AV_LOG_ERROR, "could not find fmt guid\n");
774 st = avformat_new_stream(s, NULL);
776 return AVERROR(ENOMEM);
778 /* subtract chunk header size - normal wav file doesn't count it */
779 ret = ff_get_wav_header(pb, st->codec, size - 24);
782 avio_skip(pb, FFALIGN(size, INT64_C(8)) - size);
784 handle_stream_probing(st);
785 st->need_parsing = AVSTREAM_PARSE_FULL_RAW;
787 avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
789 size = find_guid(pb, guid_data);
791 av_log(s, AV_LOG_ERROR, "could not find data guid\n");
794 wav->data_end = avio_tell(pb) + size - 24;
800 AVInputFormat ff_w64_demuxer = {
802 .long_name = NULL_IF_CONFIG_SMALL("Sony Wave64"),
803 .priv_data_size = sizeof(WAVContext),
804 .read_probe = w64_probe,
805 .read_header = w64_read_header,
806 .read_packet = wav_read_packet,
807 .read_seek = wav_read_seek,
808 .flags = AVFMT_GENERIC_INDEX,
809 .codec_tag = (const AVCodecTag* const []){ ff_codec_wav_tags, 0 },
811 #endif /* CONFIG_W64_DEMUXER */