shithub: opus-tools

Download patch

ref: 67921ee571f608bcca762fb502e90687186713a4
parent: 9d31f67b86cdc8b8048acad045dda516c8ed1b20
author: Gregory Maxwell <greg@xiph.org>
date: Tue Jul 17 10:10:05 EDT 2012

ca2f5b1c fixed the file vs wav output flag in one case but not the other.

This would cause some spurious "Error playing audio." when writing
to a file on win32, and might have caused some corrupted samples
at the end of files on BE systems.

--- a/src/opusdec.c
+++ b/src/opusdec.c
@@ -879,7 +879,7 @@
                int tmp = drain;
                if (tmp > 100)
                   tmp = 100;
-               outsamp=audio_write(zeros, channels, tmp, fout, resampler, NULL, &shapemem, strlen(outFile)==0, ((page_granule-gran_offset)*rate/48000)-link_out);
+               outsamp=audio_write(zeros, channels, tmp, fout, resampler, NULL, &shapemem, strlen(outFile)!=0, ((page_granule-gran_offset)*rate/48000)-link_out);
                link_out+=outsamp;
                audio_size+=sizeof(short)*outsamp*channels;
                drain -= tmp;