[easytag/wip/flac-vendor-string: 3/3] Read FLAC vendor string
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/flac-vendor-string: 3/3] Read FLAC vendor string
- Date: Sun, 7 Dec 2014 00:13:50 +0000 (UTC)
commit 62fcb465889ffb8eabee56d87dd1e608868c9c1c
Author: David King <amigadave amigadave com>
Date: Sun Dec 7 00:12:39 2014 +0000
Read FLAC vendor string
This is a silly idea, because the vendor string can be very long.
src/tags/flac_header.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/src/tags/flac_header.c b/src/tags/flac_header.c
index 8750f89..1b66764 100644
--- a/src/tags/flac_header.c
+++ b/src/tags/flac_header.c
@@ -121,6 +121,12 @@ et_flac_header_read_file_info (GFile *file,
ETFileInfo->version = 0; /* Not defined in FLAC file. */
}
break;
+ case FLAC__METADATA_TYPE_VORBIS_COMMENT:
+ {
+ const FLAC__StreamMetadata_VorbisComment *comment = &block->data.vorbis_comment;
+ ETFileInfo->mpc_version = g_strdup (comment->vendor_string.entry);
+ }
+ break;
default:
/* Ignore all other metadata types. */
break;
@@ -174,7 +180,15 @@ et_flac_header_display_file_info_to_ui (const ET_File *ETFile)
/* Nothing to display */
fields->version_label = _("Encoder:");
- fields->version = g_strdup ("flac");
+
+ if (!info->mpc_version)
+ {
+ fields->version = g_strdup ("flac");
+ }
+ else
+ {
+ fields->version = g_strdup (info->mpc_version);
+ }
/* Bitrate */
fields->bitrate = g_strdup_printf (_("%d kb/s"), info->bitrate);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]