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) {
711 int64_t start, end, cur;
717 while ((cur =
avio_tell(pb)) >= 0 && cur <= end - 8 ) {
726 if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
727 av_log(s, AV_LOG_WARNING,
"too big INFO subchunk\n");
731 chunk_size += (chunk_size & 1);
737 av_log(s, AV_LOG_WARNING,
"truncated file\n");
745 av_log(s, AV_LOG_ERROR,
"out of memory, unable to read INFO tag\n");
751 if (
avio_read(pb, value, chunk_size) != chunk_size) {
753 av_log(s, AV_LOG_WARNING,
"premature end of file while reading INFO tag\n");
757 value[chunk_size] = 0;
764 #endif // CONFIG_DEMUXERS