350 {
"IART",
"artist" },
351 {
"ICMT",
"comment" },
352 {
"ICOP",
"copyright" },
355 {
"ILNG",
"language" },
359 {
"ISFT",
"encoder" },
360 {
"ITCH",
"encoded_by"},
388 int waveformatextensible;
391 uint8_t *riff_extradata_start= temp;
407 if (waveformatextensible) {
425 av_log(enc, AV_LOG_WARNING,
"requested bits_per_coded_sample (%d) and actually stored (%d) differ\n", enc->
bits_per_coded_sample, bps);
454 bytestream_put_le16(&riff_extradata, 1);
455 bytestream_put_le32(&riff_extradata, 2);
456 bytestream_put_le16(&riff_extradata, 1152);
457 bytestream_put_le16(&riff_extradata, 1);
458 bytestream_put_le16(&riff_extradata, 1393);
461 bytestream_put_le16(&riff_extradata, 2);
462 bytestream_put_le32(&riff_extradata, enc->
bit_rate);
463 bytestream_put_le16(&riff_extradata, enc->
channels == 2 ? 1 : 8);
464 bytestream_put_le16(&riff_extradata, 0);
465 bytestream_put_le16(&riff_extradata, 1);
466 bytestream_put_le16(&riff_extradata, 16);
467 bytestream_put_le32(&riff_extradata, 0);
468 bytestream_put_le32(&riff_extradata, 0);
471 bytestream_put_le16(&riff_extradata, frame_size);
477 if(waveformatextensible) {
479 avio_wl16(pb, riff_extradata - riff_extradata_start + 22);
487 avio_wl16(pb, riff_extradata - riff_extradata_start);
489 avio_write(pb, riff_extradata_start, riff_extradata - riff_extradata_start);
525 int audio_frame_size;
531 if (!audio_frame_size)
536 *au_scale = audio_frame_size;
547 gcd=
av_gcd(*au_scale, *au_rate);
554 int len = strlen(str);
565 static const char riff_tags[][5] = {
566 "IARL",
"IART",
"ICMS",
"ICMT",
"ICOP",
"ICRD",
"ICRP",
"IDIM",
"IDPI",
567 "IENG",
"IGNR",
"IKEY",
"ILGT",
"ILNG",
"IMED",
"INAM",
"IPLT",
"IPRD",
568 "IPRT",
"ISBJ",
"ISFT",
"ISHP",
"ISRC",
"ISRF",
"ITCH",
576 for (i = 0; *riff_tags[i]; i++) {
594 if (!riff_has_valid_tags(s))
599 for (i = 0; *riff_tags[i]; i++) {
605 #endif //CONFIG_MUXERS
633 cbSize =
FFMIN(size, cbSize);
634 if (cbSize >= 22 &&
id == 0xfffe) {
706 int64_t start, end, cur;
712 while ((cur =
avio_tell(pb)) >= 0 && cur <= end - 8 ) {
721 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
722 av_log(s, AV_LOG_WARNING,
"too big INFO subchunk\n");
726 chunk_size += (chunk_size & 1);
732 av_log(s, AV_LOG_WARNING,
"truncated file\n");
740 av_log(s, AV_LOG_ERROR,
"out of memory, unable to read INFO tag\n");
746 if (
avio_read(pb, value, chunk_size) != chunk_size) {
748 av_log(s, AV_LOG_WARNING,
"premature end of file while reading INFO tag\n");
752 value[chunk_size] = 0;
759 #endif // CONFIG_DEMUXERS