From: SourceForge.net <no...@so...> - 2009-06-12 17:26:31
|
Bugs item #2805487, was opened at 2009-06-12 14:35 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100290&aid=2805487&group_id=290 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Frontends (lame/mp3x/...) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Wave output via stdout Initial Comment: when decoding an mp3 to stdout the result is just the beginning of the file, sometimes it's 200 bytes, sometimes it's 200 kilobytes. When decoding to file everything is ok. f.e. lame --decode stefa2.mp3 stefa2.wav produces a 38,5MB wave file from 3,2MB mp3. however lame --decode stefa2.mp3 - | tee o1.wav > nul produces a 300kB wave file (with correct length headers) system: Windows XP lame --version LAME 32bits version 3.98.2 (http://www.mp3dev.org/) tee --version GNU shellutils 1.9.4 (it's not tee's fault, i've even written a simple stdin-to-file program, result is the same) ability to write to stdout is really important for me (video editing, working with 800MB wav files...) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-06-12 17:25 Message: EDIT: my bad, please remove this bug notification. I was reading from stdin using FILE *in = fdopen(0, "rb"); . "rb" opens a stream in binary mode but file descriptor "works" in text mode, using _setmode(0, _O_BINARY); solved the problem. Once again my apologies for putting trash in the bugs forum. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-06-12 15:01 Message: EDIT: windows stops sending bytes after reaching 0x1a (ctrl+Z) :( :( :( ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-06-12 14:56 Message: EDIT: sorry, this looks more like a windows piping bug, since lame --decode stefa.mp3 - > stefa.wav produces almost correct output (bad RIFF and data length fields) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100290&aid=2805487&group_id=290 |