Am Wed, 4 Jul 2012 14:25:56 +0400 schrieb dimas <dimas...@ya.ru>: > well, in my case: > > >14:19:03 186 ~/downloads/music/Sword/1986 Metalized$ /usr/bin/mpg123 -q -w > >/dev/stdout 01.mp3 | file -
Ah, everyday I learn something new. I did not know that there is a difference for a program between $ prog > output and $prog | otherprog > output In the former case, stdout is seekable (as it's a file), in the latter, it is not (as it's a pipe). Now, thinking about it, it's obvious. The shell opens the output file and maps the file descriptor to stdout of the child. Et voilá, you got seekable stdout. Now, back to the issue. I am getting angry about this. What triggers here is the attempt of mpg123 to deal with a full disk; code which tries to deal with http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=67259 . It is actually non-trivial to handle out-of-disk well when using buffered I/O (C stdio). There is a test if at least one byte can be written at the beginning, combined with a seek to overwrite it again. I have to think hard why I did this. This is not necessary. Writing the header is test enough. Ah! No, for raw CD audio (cdr) writing, there is no header. Well, frick this ... I will remove the test with the single byte. This will fix this bug here by reverting to old behaviour. Only concession to bug 67259 is catching out-of-disk while writing WAV/AU header and informing at the end if out-of-disk condition prevented full output. I hope that makes everyone reasonably happy. Except me: I should just have ignored bug 67259. Two regressions with one attempt at fixing a not-really-fixable bug. That sucks. And: Looking for possible aliases for stdout won't happen. It will be treated just like any other file (in the case of a pipe, a non-seekable one). I will also clear up the situation about changing input format and WAV writing for the next release (at least document it). This stuff will part of mpg123 1.15.0, not a new 1.14.x release, as I am explicitly changing functionality (even if it is only a single byte write). Test with http://mpg123.org/snapshot --- does that work with dir2ogg? Alrighty then, Thomas -- Thomas Orgis - Source Mage GNU/Linux Developer (http://www.sourcemage.org) OrgisNetzOrganisation ---)=- http://orgis.org GPG public key D446D524: http://thomas.orgis.org/public_key Fingerprint: 7236 3885 A742 B736 E0C8 9721 9B4C 52BC D446 D524
signature.asc
Description: PGP signature