423 {
AV_CODEC_ID_AC3, { 0x2C, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
424 {
AV_CODEC_ID_ATRAC3P, { 0xBF, 0xAA, 0x23, 0xE9, 0x58, 0xCB, 0x71, 0x44, 0xA1, 0x19, 0xFF, 0xFA, 0x01, 0xE4, 0xCE, 0x62 } },
425 {
AV_CODEC_ID_EAC3, { 0xAF, 0x87, 0xFB, 0xA7, 0x02, 0x2D, 0xFB, 0x42, 0xA4, 0xD4, 0x05, 0xCD, 0x93, 0x84, 0x3B, 0xDD } },
426 {
AV_CODEC_ID_MP2, { 0x2B, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
431 {
"IART",
"artist" },
432 {
"ICMT",
"comment" },
433 {
"ICOP",
"copyright" },
436 {
"ILNG",
"language" },
440 {
"ISFT",
"encoder" },
441 {
"ISMP",
"timecode" },
442 {
"ITCH",
"encoded_by" },
449 if (
avio_read(s, *g,
sizeof(*g)) < (
int)
sizeof(*g))
450 memset(*g, 0,
sizeof(*g));
490 int waveformatextensible;
509 if (waveformatextensible)
532 "requested bits_per_coded_sample (%d) "
533 "and actually stored (%d) differ\n",
570 bytestream_put_le16(&riff_extradata, 1);
571 bytestream_put_le32(&riff_extradata, 2);
572 bytestream_put_le16(&riff_extradata, 1152);
573 bytestream_put_le16(&riff_extradata, 1);
574 bytestream_put_le16(&riff_extradata, 1393);
578 bytestream_put_le16(&riff_extradata, 2);
580 bytestream_put_le32(&riff_extradata, enc->
bit_rate);
582 bytestream_put_le16(&riff_extradata, enc->
channels == 2 ? 1 : 8);
584 bytestream_put_le16(&riff_extradata, 0);
586 bytestream_put_le16(&riff_extradata, 1);
588 bytestream_put_le16(&riff_extradata, 16);
590 bytestream_put_le32(&riff_extradata, 0);
592 bytestream_put_le32(&riff_extradata, 0);
595 bytestream_put_le32(&riff_extradata, 0x9ace0002);
596 bytestream_put_le32(&riff_extradata, 0xaea2f732);
597 bytestream_put_le16(&riff_extradata, 0xacde);
602 bytestream_put_le16(&riff_extradata, frame_size);
609 if (waveformatextensible) {
612 avio_wl16(pb, riff_extradata - riff_extradata_start + 22);
623 avio_wl16(pb, riff_extradata - riff_extradata_start);
625 avio_write(pb, riff_extradata_start, riff_extradata - riff_extradata_start);
662 int *au_ssize,
int *au_scale)
665 int audio_frame_size;
671 if (!audio_frame_size)
676 *au_scale = audio_frame_size;
688 gcd =
av_gcd(*au_scale, *au_rate);
695 int len = strlen(str);
706 static const char riff_tags[][5] = {
707 "IARL",
"IART",
"ICMS",
"ICMT",
"ICOP",
"ICRD",
"ICRP",
"IDIM",
"IDPI",
708 "IENG",
"IGNR",
"IKEY",
"ILGT",
"ILNG",
"IMED",
"INAM",
"IPLT",
"IPRD",
709 "IPRT",
"ISBJ",
"ISFT",
"ISHP",
"ISMP",
"ISRC",
"ISRF",
"ITCH",
717 for (i = 0; *riff_tags[i]; i++)
734 if (!riff_has_valid_tags(s))
739 for (i = 0; *riff_tags[i]; i++)
766 if (!memcmp(subformat + 4,
804 cbSize =
FFMIN(size, cbSize);
805 if (cbSize >= 22 &&
id == 0xfffe) {
806 parse_waveformatex(pb, codec);
891 if (chunk_code || chunk_size) {
897 if (chunk_size > end ||
898 end - chunk_size < cur ||
899 chunk_size == UINT_MAX) {
903 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
909 chunk_size += (chunk_size & 1);
924 "out of memory, unable to read INFO tag\n");
930 if (
avio_read(pb, value, chunk_size) != chunk_size) {
932 "premature end of file while reading INFO tag\n");