Re: [Easytag-mailing] EasyTAG 2.1.4 has been released! (Developping version)



Hi,

   Could you try if the attached patch fixes the problem?
Regards,
Jerome


Doruk Fisek wrote, the 10.12.2007 18:58 :
Mon, 10 Dec 2007 18:49:22 +0100, "Götz Waschk"
<goetz waschk gmail com> :

FLAC file support .......: yes (flac-1.1.2)
your version of flac is pretty old. It built fine here with flac
1.2.1.
Since newer versions break compatibility, I can't bump flac right now,
I'd have to re-compile other software too.

Is there a way to get it done with good old flac 1.1.2?

                   Doruk

--
FISEK INSTITUTE - http://www.fisek.org.tr

--
EasyTAG - Tag editor for MP3 and Ogg Vorbis files
http://easytag.sourceforge.net
--
Jerome COUDERC <easytag gmail com>

diff -ruN easytag-2.1.4.orig/src/easytag.c easytag-2.1.4/src/easytag.c
--- easytag-2.1.4.orig/src/easytag.c	2007-12-06 22:59:38.000000000 +0100
+++ easytag-2.1.4/src/easytag.c	2007-12-10 23:33:08.000000000 +0100
@@ -3971,6 +3971,15 @@
 #endif
 
 #ifdef ENABLE_FLAC
+        /* Patch from Josh Coalson
+         * FLAC 1.1.3 has FLAC_API_VERSION_CURRENT == 8 *
+         * by LEGACY_FLAC we mean pre-FLAC 1.1.3; in FLAC 1.1.3 the FLAC__FileDecoder was merged into the FLAC__StreamDecoder */
+        #if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8
+        #define LEGACY_FLAC // For FLAC version < 1.1.3
+        #else
+        #undef LEGACY_FLAC
+        #endif
+        
         case FLAC_TAG:
             gtk_widget_show(GTK_WIDGET(DiscNumberLabel));
             gtk_widget_show(GTK_WIDGET(DiscNumberEntry));
@@ -3990,9 +3999,10 @@
             gtk_widget_show(GTK_WIDGET(EncodedByLabel));
             gtk_widget_show(GTK_WIDGET(EncodedByEntry));
             gtk_widget_show(GTK_WIDGET(EncodedByMButton));
-            // Picture always supported now...
-            /*if (WRITE_ID3_TAGS_IN_FLAC_FILE)
-            {*/
+            // Picture supported for FLAC >= 1.1.3...
+            #ifdef LEGACY_FLAC
+            if (WRITE_ID3_TAGS_IN_FLAC_FILE)
+            {
                 gtk_widget_show(GTK_WIDGET(PictureLabel));
                 gtk_widget_show(GTK_WIDGET(PictureScrollWindow));
                 gtk_widget_show(GTK_WIDGET(PictureMButton));
@@ -4000,7 +4010,7 @@
                 gtk_widget_show(GTK_WIDGET(PictureAddButton));
                 gtk_widget_show(GTK_WIDGET(PictureSaveButton));
                 gtk_widget_show(GTK_WIDGET(PicturePropertiesButton));
-            /*}else
+            }else
             {
                 gtk_widget_hide(GTK_WIDGET(PictureLabel));
                 gtk_widget_hide(GTK_WIDGET(PictureScrollWindow));
@@ -4009,7 +4019,16 @@
                 gtk_widget_hide(GTK_WIDGET(PictureAddButton));
                 gtk_widget_hide(GTK_WIDGET(PictureSaveButton));
                 gtk_widget_hide(GTK_WIDGET(PicturePropertiesButton));
-            }*/
+            }
+            #else
+            gtk_widget_show(GTK_WIDGET(PictureLabel));
+            gtk_widget_show(GTK_WIDGET(PictureScrollWindow));
+            gtk_widget_show(GTK_WIDGET(PictureMButton));
+            gtk_widget_show(GTK_WIDGET(PictureClearButton));
+            gtk_widget_show(GTK_WIDGET(PictureAddButton));
+            gtk_widget_show(GTK_WIDGET(PictureSaveButton));
+            gtk_widget_show(GTK_WIDGET(PicturePropertiesButton));
+            #endif
             break;
 #endif
 
diff -ruN easytag-2.1.4.orig/src/flac_tag.c easytag-2.1.4/src/flac_tag.c
--- easytag-2.1.4.orig/src/flac_tag.c	2007-12-09 17:52:23.000000000 +0100
+++ easytag-2.1.4/src/flac_tag.c	2007-12-10 23:24:27.000000000 +0100
@@ -105,7 +105,9 @@
     FLAC__Metadata_SimpleIterator *iter;
     gchar *string = NULL;
     guint i;
+#ifndef LEGACY_FLAC // For FLAC >= 1.1.3
     Picture *prev_pic = NULL;
+#endif
     //gint j = 1;
 
     
@@ -615,43 +617,41 @@
             //
             // Read the PICTURE block (severals can exist)
             //
+#ifndef LEGACY_FLAC // For FLAC >= 1.1.3
             case FLAC__METADATA_TYPE_PICTURE: 
             {
                 
                 /***********
                  * Picture *
                  ***********/
-                // For FLAC >= 1.1.3
-                #ifndef LEGACY_FLAC
-                    FLAC__StreamMetadata_Picture *p;
-                    Picture *pic;
-                
-                    // Get picture data from block
-                    p = &block->data.picture;
-                
-                    pic = Picture_Allocate();
-                    if (!prev_pic)
-                        FileTag->picture = pic;
-                    else
-                        prev_pic->next = pic;
-                    prev_pic = pic;
-
-                    pic->size = p->data_length;
-                    pic->data = g_memdup(p->data,pic->size);
-                    pic->type = p->type;
-                    pic->description = g_strdup((gchar *)p->description);
-                    // Not necessary: will be calculated later
-                    //pic->height = p->height;
-                    //pic->width  = p->width;
+                FLAC__StreamMetadata_Picture *p;
+                Picture *pic;
+            
+                // Get picture data from block
+                p = &block->data.picture;
+            
+                pic = Picture_Allocate();
+                if (!prev_pic)
+                    FileTag->picture = pic;
+                else
+                    prev_pic->next = pic;
+                prev_pic = pic;
+
+                pic->size = p->data_length;
+                pic->data = g_memdup(p->data,pic->size);
+                pic->type = p->type;
+                pic->description = g_strdup((gchar *)p->description);
+                // Not necessary: will be calculated later
+                //pic->height = p->height;
+                //pic->width  = p->width;
 
-                    //g_print("Picture type : %s\n",FLAC__StreamMetadata_Picture_TypeString[p->type]);
-                    //g_print("Mime    type : %s\n",p->mime_type);
+                //g_print("Picture type : %s\n",FLAC__StreamMetadata_Picture_TypeString[p->type]);
+                //g_print("Mime    type : %s\n",p->mime_type);
 
-                #endif
-                
                 break;
             }
-            
+#endif
+                
             default:
                 break;
         }
@@ -822,12 +822,14 @@
             //
             // Delete all the PICTURE blocks, and convert to padding
             //
+#ifndef LEGACY_FLAC // For FLAC >= 1.1.3
             case FLAC__METADATA_TYPE_PICTURE: 
             {
                 FLAC__metadata_iterator_delete_block(iter,true);
                 break;
             }
-
+#endif
+            
             default:
                 break;
         }


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