[easytag] Simplify reading artwork description from Ogg tags
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Simplify reading artwork description from Ogg tags
- Date: Thu, 18 Dec 2014 18:09:52 +0000 (UTC)
commit 15eec372a8b0162dad18c36a7463aad135831bfe
Author: David King <amigadave amigadave com>
Date: Thu Dec 18 17:43:32 2014 +0000
Simplify reading artwork description from Ogg tags
src/tags/ogg_tag.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/src/tags/ogg_tag.c b/src/tags/ogg_tag.c
index 99a103a..3a48834 100644
--- a/src/tags/ogg_tag.c
+++ b/src/tags/ogg_tag.c
@@ -559,14 +559,9 @@ et_add_file_tags_from_vorbis_comments (vorbis_comment *vc,
desclen = read_guint32_from_byte (decoded_ustr, bytes_pos);
bytes_pos += 4;
- pic->description = g_malloc (desclen + 1);
+ pic->description = g_strndup ((const gchar *)&decoded_ustr[bytes_pos],
+ desclen);
- for (i = 0; i < desclen; i++)
- {
- pic->description [i] = decoded_ustr [i + bytes_pos];
- }
-
- pic->description [desclen] = '\0';
bytes_pos += desclen + 16;
/* Reading picture size */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]