Author: dmeyer
Date: Wed Jan 10 19:59:29 2007
New Revision: 2376

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

Log:
fix length crash for subtitles

Modified: trunk/metadata/src/video/ogm.py
==============================================================================
--- trunk/metadata/src/video/ogm.py     (original)
+++ trunk/metadata/src/video/ogm.py     Wed Jan 10 19:59:29 2007
@@ -108,9 +108,6 @@
         # Copy metadata to the streams
         if len(self.all_header) == len(self.all_streams):
             for i in range(len(self.all_header)):
-                # set length
-                self.length = max(self.all_streams[i].length, self.length)
-
                 # get meta info
                 for key in self.all_streams[i].keys():
                     if self.all_header[i].has_key(key):
@@ -121,11 +118,6 @@
                         self.all_streams[i][key] = asi
                         del self.all_header[i][key.upper()]
 
-                # Extract subtitles:
-                if hasattr(self.all_streams[i], 'type') and \
-                   self.all_streams[i].type == 'subtitle':
-                    self.subtitles.append(self.all_streams[i].language)
-
                 # Chapter parser
                 if self.all_header[i].has_key('CHAPTER01') and \
                        not self.chapters:
@@ -152,10 +144,6 @@
                         else:
                             break
 
-        for stream in self.all_streams:
-            if not stream.length:
-                stream.length = self.length
-
         # If there are no video streams in this ogg container, it
         # must be an audio file.  Raise an exception to cause the
         # factory to fall back to audio.ogg.
@@ -303,6 +291,7 @@
             elif htype[:4] == 'text':
                 subtitle = core.Subtitle()
                 # FIXME: add more info
+                self.subtitles.append(subtitle)
                 self.all_streams.append(subtitle)
 
         else:

-------------------------------------------------------------------------
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