425 {
AV_CODEC_ID_AC3, { 0x2C, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
426 {
AV_CODEC_ID_ATRAC3P, { 0xBF, 0xAA, 0x23, 0xE9, 0x58, 0xCB, 0x71, 0x44, 0xA1, 0x19, 0xFF, 0xFA, 0x01, 0xE4, 0xCE, 0x62 } },
427 {
AV_CODEC_ID_EAC3, { 0xAF, 0x87, 0xFB, 0xA7, 0x02, 0x2D, 0xFB, 0x42, 0xA4, 0xD4, 0x05, 0xCD, 0x93, 0x84, 0x3B, 0xDD } },
428 {
AV_CODEC_ID_MP2, { 0x2B, 0x80, 0x6D, 0xE0, 0x46, 0xDB, 0xCF, 0x11, 0xB4, 0xD1, 0x00, 0x80, 0x5F, 0x6C, 0xBB, 0xEA } },
433 {
"IART",
"artist" },
434 {
"ICMT",
"comment" },
435 {
"ICOP",
"copyright" },
438 {
"ILNG",
"language" },
442 {
"ISFT",
"encoder" },
443 {
"ISMP",
"timecode" },
444 {
"ITCH",
"encoded_by" },
451 if (
avio_read(s, *g,
sizeof(*g)) < (
int)
sizeof(*g))
452 memset(*g, 0,
sizeof(*g));
502 int waveformatextensible;
521 if (waveformatextensible)
544 "requested bits_per_coded_sample (%d) "
545 "and actually stored (%d) differ\n",
582 bytestream_put_le16(&riff_extradata, 1);
583 bytestream_put_le32(&riff_extradata, 2);
584 bytestream_put_le16(&riff_extradata, 1152);
585 bytestream_put_le16(&riff_extradata, 1);
586 bytestream_put_le16(&riff_extradata, 1393);
590 bytestream_put_le16(&riff_extradata, 2);
592 bytestream_put_le32(&riff_extradata, enc->
bit_rate);
594 bytestream_put_le16(&riff_extradata, enc->
channels == 2 ? 1 : 8);
596 bytestream_put_le16(&riff_extradata, 0);
598 bytestream_put_le16(&riff_extradata, 1);
600 bytestream_put_le16(&riff_extradata, 16);
602 bytestream_put_le32(&riff_extradata, 0);
604 bytestream_put_le32(&riff_extradata, 0);
607 bytestream_put_le32(&riff_extradata, 0x9ace0002);
608 bytestream_put_le32(&riff_extradata, 0xaea2f732);
609 bytestream_put_le16(&riff_extradata, 0xacde);
614 bytestream_put_le16(&riff_extradata, frame_size);
621 if (waveformatextensible) {
624 avio_wl16(pb, riff_extradata - riff_extradata_start + 22);
635 avio_wl16(pb, riff_extradata - riff_extradata_start);
637 avio_write(pb, riff_extradata_start, riff_extradata - riff_extradata_start);
674 int *au_ssize,
int *au_scale)
677 int audio_frame_size;
683 if (!audio_frame_size)
688 *au_scale = audio_frame_size;
700 gcd =
av_gcd(*au_scale, *au_rate);
707 int len = strlen(str);
718 static const char riff_tags[][5] = {
719 "IARL",
"IART",
"ICMS",
"ICMT",
"ICOP",
"ICRD",
"ICRP",
"IDIM",
"IDPI",
720 "IENG",
"IGNR",
"IKEY",
"ILGT",
"ILNG",
"IMED",
"INAM",
"IPLT",
"IPRD",
721 "IPRT",
"ISBJ",
"ISFT",
"ISHP",
"ISMP",
"ISRC",
"ISRF",
"ITCH",
729 for (i = 0; *riff_tags[i]; i++)
746 if (!riff_has_valid_tags(s))
751 for (i = 0; *riff_tags[i]; i++)
778 if (!memcmp(subformat + 4,
816 cbSize =
FFMIN(size, cbSize);
817 if (cbSize >= 22 &&
id == 0xfffe) {
818 parse_waveformatex(pb, codec);
903 if (chunk_code || chunk_size) {
909 if (chunk_size > end ||
910 end - chunk_size < cur ||
911 chunk_size == UINT_MAX) {
915 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
921 chunk_size += (chunk_size & 1);
936 "out of memory, unable to read INFO tag\n");
942 if (
avio_read(pb, value, chunk_size) != chunk_size) {
944 "premature end of file while reading INFO tag\n");