394 {
AV_CODEC_ID_AC3, {0x2C,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
395 {
AV_CODEC_ID_ATRAC3P, {0xBF,0xAA,0x23,0xE9,0x58,0xCB,0x71,0x44,0xA1,0x19,0xFF,0xFA,0x01,0xE4,0xCE,0x62}},
396 {
AV_CODEC_ID_EAC3, {0xAF,0x87,0xFB,0xA7,0x02,0x2D,0xFB,0x42,0xA4,0xD4,0x05,0xCD,0x93,0x84,0x3B,0xDD}},
397 {
AV_CODEC_ID_MP2, {0x2B,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
402 {
"IART",
"artist" },
403 {
"ICMT",
"comment" },
404 {
"ICOP",
"copyright" },
407 {
"ILNG",
"language" },
411 {
"ISFT",
"encoder" },
412 {
"ISMP",
"timecode" },
413 {
"ITCH",
"encoded_by"},
441 int waveformatextensible;
460 if (waveformatextensible) {
517 bytestream_put_le16(&riff_extradata, 1);
518 bytestream_put_le32(&riff_extradata, 2);
519 bytestream_put_le16(&riff_extradata, 1152);
520 bytestream_put_le16(&riff_extradata, 1);
521 bytestream_put_le16(&riff_extradata, 1393);
524 bytestream_put_le16(&riff_extradata, 2);
525 bytestream_put_le32(&riff_extradata, enc->
bit_rate);
526 bytestream_put_le16(&riff_extradata, enc->
channels == 2 ? 1 : 8);
527 bytestream_put_le16(&riff_extradata, 0);
528 bytestream_put_le16(&riff_extradata, 1);
529 bytestream_put_le16(&riff_extradata, 16);
530 bytestream_put_le32(&riff_extradata, 0);
531 bytestream_put_le32(&riff_extradata, 0);
534 bytestream_put_le32(&riff_extradata, 0x9ace0002);
535 bytestream_put_le32(&riff_extradata, 0xaea2f732);
536 bytestream_put_le16(&riff_extradata, 0xacde);
539 bytestream_put_le16(&riff_extradata, frame_size);
545 if(waveformatextensible) {
547 avio_wl16(pb, riff_extradata - riff_extradata_start + 22);
555 avio_wl16(pb, riff_extradata - riff_extradata_start);
557 avio_write(pb, riff_extradata_start, riff_extradata - riff_extradata_start);
593 int audio_frame_size;
599 if (!audio_frame_size)
604 *au_scale = audio_frame_size;
615 gcd=
av_gcd(*au_scale, *au_rate);
622 int len = strlen(str);
633 static const char riff_tags[][5] = {
634 "IARL",
"IART",
"ICMS",
"ICMT",
"ICOP",
"ICRD",
"ICRP",
"IDIM",
"IDPI",
635 "IENG",
"IGNR",
"IKEY",
"ILGT",
"ILNG",
"IMED",
"INAM",
"IPLT",
"IPRD",
636 "IPRT",
"ISBJ",
"ISFT",
"ISHP",
"ISMP",
"ISRC",
"ISRF",
"ITCH",
644 for (i = 0; *riff_tags[i]; i++) {
662 if (!riff_has_valid_tags(s))
667 for (i = 0; *riff_tags[i]; i++) {
673 #endif //CONFIG_MUXERS
706 cbSize =
FFMIN(size, cbSize);
707 if (cbSize >= 22 &&
id == 0xfffe) {
790 if (
avio_read(s, *g,
sizeof(*g)) < (
int)
sizeof(*g))
791 memset(*g, 0,
sizeof(*g));
806 int64_t start,
end, cur;
812 while ((cur =
avio_tell(pb)) >= 0 && cur <= end - 8 ) {
821 if (chunk_code || chunk_size) {
827 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
831 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
837 chunk_size += (chunk_size & 1);
857 if (
avio_read(pb, value, chunk_size) != chunk_size) {
866 #endif // CONFIG_DEMUXERS