Merge pull request #826 from JackDandy/feature/ChangeHachoir

Change improve fault tolerance of Hachoir jpeg parser.
This commit is contained in:
JackDandy 2016-11-13 02:00:22 +00:00 committed by GitHub
commit 2dccb15e0e
3 changed files with 6 additions and 0 deletions

View file

@ -180,6 +180,7 @@
* Fix never set episodes without airdate to wanted
* Change improve getting the local timezone information
* Change hachoir_parser to close input stream if no parser is found e.g. due to file corruption
* Change improve fault tolerance of Hachoir jpeg parser
* Change reduce time taken to parse avi RIFF metadata during post processing and other times
* Change avi metadata extraction is more fault tolerant and the chance of hanging due to corrupt avi files is reduced
* Change fuzzyMoment to handle air dates before ~1970 on display show page

View file

@ -4,6 +4,7 @@ Libs with customisations...
/lib/dateutil/zoneinfo/__init__.py
/lib/hachoir_core/config.py
/lib/hachoir_core/stream/input_helpers.py
/lib/hachoir_metadata/jpeg.py
/lib/hachoir_metadata/metadata.py
/lib/hachoir_metadata/riff.py
/lib/hachoir_parser/guess.py

View file

@ -210,6 +210,10 @@ class JpegMetadata(RootMetadata):
datestamp = None
for entry in ifd.array("entry"):
tag = entry["tag"].display
if tag not in ["GPSLatitudeRef", "GPSLongitudeRef","GPSAltitudeRef",
"GPSLatitude", "GPSLongitude", "GPSAltitude",
"GPSDateStamp", "GPSTimeStamp"]:
continue
values = [v.value for v in ifd.getEntryValues(entry)]
if tag == "GPSLatitudeRef":
if values[0] == "N":