Author: duncan
Date: Thu May 31 16:23:13 2007
New Revision: 9623
Modified:
branches/rel-1/freevo/src/encodingcore.py
Log:
Changed behaviour of length for bad mpeg_ts files
Modified: branches/rel-1/freevo/src/encodingcore.py
==============================================================================
--- branches/rel-1/freevo/src/encodingcore.py (original)
+++ branches/rel-1/freevo/src/encodingcore.py Thu May 31 16:23:13 2007
@@ -247,9 +247,7 @@
dvddata = mmpython.parse(self.source)
dvdtitle = dvddata.tracks[self.chapter - 1]
self.length = dvdtitle['length']
- _debug_('Video length: %s' % self.length)
- #NI : maybe implement procedure to get resolution, handy for
scaling/manual cropping
- self._CropDetect()
+ _debug_('Video length is %s' % self.length)
else:
data = mmpython.parse(self.source)
_debug_('source=\"%s\"' % (self.source))
@@ -257,12 +255,14 @@
if config.DEBUG >= 2:
for f in dir(data):
_debug_('%s: %s' % (f, eval('data["%s"]' % f)), 2)
- try:
- self.length = data.get_length()
- except:
+ if data.has_key('length'):
+ self.length = data['length']
+ _debug_('Video length is %s' % self.length)
+ else:
self.length = 600
- _debug_('Video length: %s' % self.length)
- self._CropDetect()
+ _debug_('Video length not found, using %s' % (self.length))
+ #NI : maybe implement procedure to get resolution, handy for
scaling/manual cropping
+ self._CropDetect()
def _CropDetect(self): #contains pieces of QuickRip
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog