Sometimes you're piping some data into flac, and you know what its size is going to be. But despite this, flac disables a lot of options when reading from stdin because it can't discern the size of stdin, and until now it had no means of providing it with a size for stdin. In order to have features like --skip, --until, and --cuesheet available when reading stdin, I added an --input-size option to set the input size, implemented in the attached patch. If the size specified is too long, FLAC will of course complain about an unexpected EOF; if too short, FLAC will just ignore everything after the given number of bytes. If it's just right, it of course works fine. If there are any other test cases I should try, I'd love to hear about them.

Attachment: flac-input-size.diff.bz2
Description: Binary data

Reply via email to