Commits

shuerhaaken committed 15ad4ef

use valid flag everywhere

Comments (0)

Files changed (13)

+commit e5e99d0de3296bdf8bbf08f82125ff6d9b261392
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Thu Mar 21 10:10:21 2013 +0100
+
+    add image read/write test for spx files
+
 commit a8b14348ec975dfcf79cc217424d02787a4e440b
 Author: Jörn Magens <shuerhaaken@googlemail.com>
 Date:   Thu Mar 21 10:06:39 2013 +0100

libtaginfo/aiffinfo.cc

         printf("Error creating file ref! %s\n", filename.toCString(false));
     if(taglib_file) {
         taglib_tag = ((TagLib::RIFF::AIFF::File *) taglib_file)->tag();
+        if(!taglib_tag)
+            valid = false;
     }
     else {
         printf("Cant get tag from '%s'\n", file_name.toCString(false));
         taglib_tag = NULL;
+        valid = false;
     }
 }
 

libtaginfo/apeinfo.cc

             taglib_tag = ((TagLib::APE::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
     else {
         printf("Cant get tag from '%s'\n", file_name.toCString(false));
         taglib_apetag = NULL;
+        valid = false;
     }
 }
 

libtaginfo/asfinfo.cc

         printf("Error creating file ref! %s\n", filename.toCString());
     if(taglib_file) {
         asf_tag = ((TagLib::ASF::File *) taglib_file)->tag();
+        if(!asf_tag)
+            valid = false;
     }
     else {
         printf("Cant get xiphcomment from '%s'\n", file_name.toCString(false));
         asf_tag = NULL;
+        valid = false;
     }
 }
 

libtaginfo/flacinfo.cc

             taglib_tag = ((TagLib::FLAC::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
     else {
         printf("Cant get xiphcomment from '%s'\n", file_name.toCString(false));
         xiphcomment = NULL;
+        valid = false;
     }
 }
 

libtaginfo/mp3info.cc

             taglib_tag = ((TagLib::MPEG::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
     else {
         printf("Cant get id3 tag from '%s'\n", file_name.toCString(false));
         taglib_tagId3v2 = NULL;
+        valid = false;
     }
 }
 

libtaginfo/mp4info.cc

             taglib_tag = ((TagLib::MP4::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
     else {
         printf("Cant get tag from '%s'\n", file_name.toCString(false));
         mp4_tag = NULL;
+        valid = false;
     }
 }
 

libtaginfo/mpcinfo.cc

             taglib_tag = ((TagLib::MPC::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
     else {
         printf("Cant get tag from '%s'\n", file_name.toCString(false));
         taglib_apetag = NULL;
+        valid = false;
     }
 }
 

libtaginfo/ogginfo.cc

             taglib_tag = ((TagLib::Ogg::Vorbis::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
     else {
         printf("Cant get xiphcomment from '%s'\n", file_name.toCString(false));
         xiphcomment = NULL;
+        valid = false;
     }
 }
 

libtaginfo/speexinfo.cc

             taglib_tag = ((TagLib::Ogg::Speex::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
     else {
         printf("Cant get xiphcomment from '%s'\n", file_name.toCString(false));
         xiphcomment = NULL;
+        valid = false;
     }
 }
 

libtaginfo/trueaudioinfo.cc

             taglib_tag = ((TagLib::TrueAudio::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
     else {
         taglib_tagId3v2 = NULL;
+        valid = false;
     }
 }
 

libtaginfo/waveinfo.cc

             taglib_tag = ((TagLib::RIFF::WAV::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
     else {
         printf("Cant get id3 tag from '%s'\n", file_name.toCString(false));
         taglib_tagId3v2 = NULL;
+        valid = false;
     }
 }
 

libtaginfo/wavpackinfo.cc

             taglib_tag = ((TagLib::WavPack::File *) taglib_file)->tag();
             if(!taglib_tag) {
                 printf("Cant get tag object from '%s'\n", file_name.toCString(false));
+                valid = false;
             }
         }
     }
-    else
+    else {
         taglib_apetag = NULL;
+        valid = false;
+    }
 }