[easytag] Avoid warnings due to uninitialized values



commit c17f82ba10ee4a908db90c86ca66e0dd18b6f53a
Author: David King <amigadave amigadave com>
Date:   Sun Dec 28 14:59:51 2014 +0000

    Avoid warnings due to uninitialized values

 src/tag_area.c     |    2 +-
 src/tags/ogg_tag.c |    8 ++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/tag_area.c b/src/tag_area.c
index 7a743c7..ca05927 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -1429,7 +1429,7 @@ load_picture_from_file (GFile *file,
                 if (g_settings_get_boolean (MainSettings,
                                             "tag-image-type-automatic"))
                 {
-                    type = et_picture_type_from_filename (pic->description);
+                    type = et_picture_type_from_filename (description);
                 }
                 else
                 {
diff --git a/src/tags/ogg_tag.c b/src/tags/ogg_tag.c
index 815f6ce..948e30c 100644
--- a/src/tags/ogg_tag.c
+++ b/src/tags/ogg_tag.c
@@ -501,12 +501,20 @@ et_add_file_tags_from_vorbis_comments (vorbis_comment *vc,
         {
             type = atoi (string);
         }
+        else
+        {
+            type = ET_PICTURE_TYPE_FRONT_COVER;
+        }
 
         if ((string = vorbis_comment_query (vc, "COVERARTDESCRIPTION",
                                             field_num - 1)) != NULL)
         {
             description = string;
         }
+        else
+        {
+            description = "";
+        }
 
         pic = et_picture_new (type, description, 0, 0, bytes);
         g_bytes_unref (bytes);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]