go-audio / wav

Battle tested Wav decoder/encoder
Apache License 2.0
309 stars 46 forks source link

Change temporary sizes to fix broken pipes #41

Closed ScriptTiger closed 4 weeks ago

ScriptTiger commented 1 month ago

Some software, like VLC, is smart enough to know that if it's being fed from standard input, header information detailing file size and number of bytes written, etc., will probably be irrelevant and totally skips them. However, other software, like FFmpeg, use temporary sizes of 0xFFFFFFFF for pipes. Since FFmpeg/libavformat libraries are so pervasive, using 0xFFFFFFFF will make this package compatible with piping into software using those libraries, while also not breaking software it's already compatible with now.

mattetti commented 4 weeks ago

I didn't know that was a thing, thank you @ScriptTiger !