shithub: aacdec

Download patch

ref: 4cebe678d736d6bf846d8d80e8243a3efa48e090
parent: b3b26efdbae258ed54d186bbfd0a4375128b2db1
author: menno <menno>
date: Sun Dec 29 06:05:13 EST 2002

Bugfix

--- a/plugins/foo_mp4/foo_mp4.cpp
+++ b/plugins/foo_mp4/foo_mp4.cpp
@@ -16,7 +16,7 @@
 ** along with this program; if not, write to the Free Software
 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **
-** $Id: foo_mp4.cpp,v 1.8 2002/12/29 10:46:50 menno Exp $
+** $Id: foo_mp4.cpp,v 1.9 2002/12/29 11:05:13 menno Exp $
 **/
 
 #include <mp4.h>
@@ -147,14 +147,18 @@
         if (track < 1) return 0;
 
         MP4TagDelete(hFile, track);
-        MP4TagCreate(hFile, track);
 
         int numItems = info->meta_get_count();
-        for (int i = 0; i < numItems; i++)
+        if (numItems > 0)
         {
-            const char *n = info->meta_enum_name(i);
-            const char *v = info->meta_enum_value(i);
-            MP4TagAddEntry(hFile, track, n, v);
+            MP4TagCreate(hFile, track);
+
+            for (int i = 0; i < numItems; i++)
+            {
+                const char *n = info->meta_enum_name(i);
+                const char *v = info->meta_enum_value(i);
+                MP4TagAddEntry(hFile, track, n, v);
+            }
         }
 
         return 1;
--- a/plugins/foo_mp4/foo_mp4.sln
+++ b/plugins/foo_mp4/foo_mp4.sln
@@ -1,13 +1,13 @@
 Microsoft Visual Studio Solution File, Format Version 7.00
-Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "foo_mp4", "foo_mp4.vcproj", "{5CEB23D7-5BDB-4D77-978A-D5B8572843FF}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foo_mp4", "foo_mp4.vcproj", "{5CEB23D7-5BDB-4D77-978A-D5B8572843FF}"
 EndProject
-Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "foobar2000_SDK", "foobar2000\SDK\foobar2000_SDK.vcproj", "{409102E1-0B45-41CD-A3F8-C37371520D9B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_SDK", "foobar2000\SDK\foobar2000_SDK.vcproj", "{409102E1-0B45-41CD-A3F8-C37371520D9B}"
 EndProject
-Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "libfaad", "..\..\libfaad\libfaad.vcproj", "{AB39547E-6CAC-4E25-8BC4-C97EFC144800}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfaad", "..\..\libfaad\libfaad.vcproj", "{AB39547E-6CAC-4E25-8BC4-C97EFC144800}"
 EndProject
-Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "pfc_unicode", "pfc\pfc_unicode.vcproj", "{5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pfc_unicode", "pfc\pfc_unicode.vcproj", "{5C9C90BE-0FEA-4C67-9A4C-C2513C2E27C4}"
 EndProject
-Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "libmp4v2_cb", "..\..\common\mp4v2\libmp4v2_cb.vcproj", "{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp4v2_cb", "..\..\common\mp4v2\libmp4v2_cb.vcproj", "{FAEB6203-052A-4073-AC1C-9CF6FB5B40CC}"
 EndProject
 Global
 	GlobalSection(SolutionConfiguration) = preSolution