mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
src/sndfile.c : Make sure psf->have_written gets set correctly in mode SFM_RDWR.
This commit is contained in:
parent
5506f2e2f3
commit
63f389b20b
@ -9,6 +9,9 @@
|
||||
* src/wav.c
|
||||
Fix to WAV parser to allow 'bext' chunk to be updated in place.
|
||||
|
||||
* src/sndfile.c
|
||||
Make sure psf->have_written gets set correctly in mode SFM_RDWR.
|
||||
|
||||
2008-08-16 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* configure.ac
|
||||
|
@ -2716,7 +2716,11 @@ psf_open_file (SF_PRIVATE *psf, int mode, SF_INFO *sfinfo)
|
||||
} ;
|
||||
|
||||
psf->read_current = 0 ;
|
||||
psf->write_current = (psf->mode == SFM_RDWR) ? psf->sf.frames : 0 ;
|
||||
psf->write_current = 0 ;
|
||||
if (psf->mode == SFM_RDWR)
|
||||
{ psf->write_current = psf->sf.frames ;
|
||||
psf->have_written = psf->sf.frames > 0 ? SF_TRUE : SF_FALSE ;
|
||||
} ;
|
||||
|
||||
memcpy (sfinfo, &(psf->sf), sizeof (SF_INFO)) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user