output error if soundstream requested but not found
authorkramm <kramm>
Fri, 26 Sep 2008 11:31:13 +0000 (11:31 +0000)
committerkramm <kramm>
Fri, 26 Sep 2008 11:31:13 +0000 (11:31 +0000)
src/swfextract.c

index f636eea..f66dd83 100644 (file)
@@ -940,7 +940,7 @@ void handlelossless(TAG*tag)
 }
 #endif
 
-FILE*mp3file;
+static FILE*mp3file=0;
 void handlesoundstream(TAG*tag)
 {
     char*filename = "output.mp3";
@@ -1183,8 +1183,13 @@ int main (int argc,char ** argv)
     if (found)
        extractTag(&swf, destfilename);
 
-    if(mp3file)
+    if(mp3file) {
        fclose(mp3file);
+    } else {
+        if(extractmp3) {
+            msg("<error> Didn't find a soundstream in file");
+        }
+    }
 
     swf_FreeTags(&swf);
     return 0;