From d6d33e21e7f6ff3e90e5b8f7f079d44e76619fe7 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Fri, 19 Sep 2014 17:35:35 +1000 Subject: [PATCH] vorbiscomment.c : Do not write empty vorbiscomment fields. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That is, only write vorbis comment fields if they are non-empty. Patch-from: Janne Hyvärinen --- src/flac/vorbiscomment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }