Here's a patch that stops the flac binary from writing empty tag fields. At least in Windows world these come to files by accident. CD extraction programs pass all possible metadata entries they allow setting in the UI to flac binary and most of the time most fields are empty when basic info like artist, album, title, track number and release date are the only fields that are set.
diff --git a/src/flac/vorbiscomment.c b/src/flac/vorbiscomment.c
index ed9f710..0e99267 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;
        }
_______________________________________________
flac-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/flac-dev

Reply via email to