mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-27 03:50:29 +00:00
src/strings.c : Fix logic for testing if audio data has been written and string is added.
This commit is contained in:
parent
01527eace7
commit
3211a29d2f
@ -3,6 +3,9 @@
|
||||
* tests/string_test.c
|
||||
Add ability to test strings stored in metadata secion of FLAC files.
|
||||
|
||||
* src/string.c
|
||||
Fix logic for testing if audio data has been written and string is added.
|
||||
|
||||
2007-07-12 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/flac.c
|
||||
|
@ -45,7 +45,7 @@ psf_store_string (SF_PRIVATE *psf, int str_type, const char *str)
|
||||
if (psf->mode == SFM_WRITE || psf->mode == SFM_RDWR)
|
||||
{ if ((psf->str_flags & SF_STR_ALLOW_START) == 0)
|
||||
return SFE_STR_NO_SUPPORT ;
|
||||
if ((psf->str_flags & SF_STR_ALLOW_END) == 0)
|
||||
if (psf->have_written && (psf->str_flags & SF_STR_ALLOW_END) == 0)
|
||||
return SFE_STR_NO_SUPPORT ;
|
||||
/* Only allow zero length strings for software. */
|
||||
if (str_type != SF_STR_SOFTWARE && str_len == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user