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>
This commit is contained in:
Erik de Castro Lopo 2014-09-19 17:35:35 +10:00
parent 4fa58808df
commit d6d33e21e7

View File

@ -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;
}