diff options
author | waker <wakeroid@gmail.com> | 2011-05-17 21:46:13 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-05-17 21:46:13 +0200 |
commit | 89d065fc993fcf0de7a5edfb120e070f4fff5a32 (patch) | |
tree | aff32e936296fee94c4a2b4fb14ab180ab46e062 /plugins | |
parent | bbbe002eced2f421036076cc3746a4bc7a092bad (diff) |
converter: write 0 size to waveheader in pipe mode, to workaround oggenc bug
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/converter/converter.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/converter/converter.c b/plugins/converter/converter.c index 513b491a..0eb68634 100644 --- a/plugins/converter/converter.c +++ b/plugins/converter/converter.c @@ -858,12 +858,16 @@ convert (DB_playItem_t *it, const char *outfolder, const char *outfile, int outp memcpy (&wavehdr[34], &output_bps, 2); fwrite (wavehdr, 1, wavehdr_size, temp_file); + if (encoder_preset->method == DDB_ENCODER_METHOD_PIPE) { + size = 0; + } fwrite (&size, 1, sizeof (size), temp_file); header_written = 1; } - if (sz != fwrite (buffer, 1, sz, temp_file)) { - fprintf (stderr, "converter: write error\n"); + int64_t res = fwrite (buffer, 1, sz, temp_file); + if (sz != res) { + fprintf (stderr, "converter: write error (%lld bytes written out of %d)\n", res, sz); goto error; } } |