src/alac.c : Make sure temp file gets opened in binary mode.

This commit is contained in:
Erik de Castro Lopo 2012-03-06 08:03:45 +11:00
parent a53b8479f3
commit 542ef9fa49
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-02-06 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* src/alac.c
Make sure temp file gets opened in binary mode.
2012-02-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com> 2012-02-05 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* src/ * src/

View File

@ -336,7 +336,7 @@ alac_writer_init (SF_PRIVATE *psf)
return SFE_NO_TEMP_DIR ; return SFE_NO_TEMP_DIR ;
snprintf (plac->enctmpname, sizeof (plac->enctmpname), "%s/%x%x.alac", tmpdir, psf_rand_int32 (), psf_rand_int32 ()) ; snprintf (plac->enctmpname, sizeof (plac->enctmpname), "%s/%x%x.alac", tmpdir, psf_rand_int32 (), psf_rand_int32 ()) ;
if ((plac->enctmp = fopen (plac->enctmpname, "w+")) == NULL) if ((plac->enctmp = fopen (plac->enctmpname, "wb+")) == NULL)
return SFE_ALAC_FAIL_TMPFILE ; return SFE_ALAC_FAIL_TMPFILE ;
alac_encoder_init (&plac->encoder, psf->sf.samplerate, psf->sf.channels, alac_format_flags, ALAC_FRAME_LENGTH) ; alac_encoder_init (&plac->encoder, psf->sf.samplerate, psf->sf.channels, alac_format_flags, ALAC_FRAME_LENGTH) ;