Author: dmeyer
Date: Wed Jan 10 20:12:36 2007
New Revision: 2377

Modified:
   trunk/metadata/src/video/ogm.py

Log:
fix chapter parser, incr. MAXITERATIONS

Modified: trunk/metadata/src/video/ogm.py
==============================================================================
--- trunk/metadata/src/video/ogm.py     (original)
+++ trunk/metadata/src/video/ogm.py     Wed Jan 10 20:12:36 2007
@@ -64,7 +64,7 @@
                   'GENRE': 'genre',
                 }
 
-MAXITERATIONS = 10
+MAXITERATIONS = 30
 
 class Ogm(core.AVContainer):
 
@@ -108,6 +108,7 @@
         # Copy metadata to the streams
         if len(self.all_header) == len(self.all_streams):
             for i in range(len(self.all_header)):
+
                 # get meta info
                 for key in self.all_streams[i].keys():
                     if self.all_header[i].has_key(key):
@@ -122,9 +123,7 @@
                 if self.all_header[i].has_key('CHAPTER01') and \
                        not self.chapters:
                     while 1:
-                        s = 'CHAPTER0%s' % (len(self.chapters) + 1)
-                        if len(s) < 9:
-                            s = '0' + s
+                        s = 'CHAPTER%02d' % (len(self.chapters) + 1)
                         if self.all_header[i].has_key(s) and \
                                self.all_header[i].has_key(s + 'NAME'):
                             pos = self.all_header[i][s]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to