diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-09-19 17:35:35 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-09-19 17:51:17 +1000 |
commit | d6d33e21e7f6ff3e90e5b8f7f079d44e76619fe7 (patch) | |
tree | 1beb44530e7929ebfdef6c407ff42878c91b55e9 | |
parent | 4fa58808dfddd1621fc50c8b020c516eeac283d8 (diff) | |
download | flac-d6d33e21e7f6ff3e90e5b8f7f079d44e76619fe7.tar.gz |
vorbiscomment.c : Do not write empty vorbiscomment fields.
That is, only write vorbis comment fields if they are non-empty.
Patch-from: Janne Hyvärinen <cse@sci.fi>
-rw-r--r-- | src/flac/vorbiscomment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flac/vorbiscomment.c b/src/flac/vorbiscomment.c index ed9f7105..0e99267c 100644 --- a/src/flac/vorbiscomment.c +++ b/src/flac/vorbiscomment.c @@ -243,7 +243,7 @@ FLAC__bool flac__vorbiscomment_add(FLAC__StreamMetadata *block, const char *comm return false; } - if(!set_vc_field(block, &parsed, &dummy, raw, violation)) { + if(parsed.field_value_length > 0 && !set_vc_field(block, &parsed, &dummy, raw, violation)) { free_field(&parsed); return false; } |