Author: dmeyer
Date: Fri Dec 29 13:19:03 2006
New Revision: 2298
Modified:
trunk/metadata/src/video/mov.py
Log:
prevent crash on broken files and support skip atim
Modified: trunk/metadata/src/video/mov.py
==============================================================================
--- trunk/metadata/src/video/mov.py (original)
+++ trunk/metadata/src/video/mov.py Fri Dec 29 13:19:03 2006
@@ -86,7 +86,7 @@
h = file.read(8)
(size,type) = unpack('>I4s',h)
- while type == 'mdat':
+ while type in ('mdat', 'skip'):
# movie data at the beginning, skip
file.seek(size-8, 1)
h = file.read(8)
@@ -129,7 +129,7 @@
if ord(datatype[0]) == 169:
# i18n Metadata...
mypos = 8+pos
- while mypos < datasize+pos:
+ while mypos + 4 < datasize+pos:
# first 4 Bytes are i18n header
(tlen, lang) = unpack('>HH', atomdata[mypos:mypos+4])
i18ntabl[lang] = i18ntabl.get(lang, {})
@@ -171,7 +171,7 @@
# XXX 2082844800 is the difference between Unix and
# XXX Apple time. Fix me to work on Apple, too
self.date = int(tkhd[1]) - 2082844800
- self.date = time.strftime('%y/%m/%d',
+ self.date = time.strftime('%y.%m.%d %H:%M:%S',
time.gmtime(self.date))
except Exception, e:
log.exception('There was trouble extracting the date')
-------------------------------------------------------------------------
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