Browse Source

Change improve fault tolerance of Hachoir jpeg parser.

Ignore fields not required for GPS tag parsing.
pull/826/head
JackDandy 9 years ago
parent
commit
63e12cff11
  1. 1
      CHANGES.md
  2. 1
      HACKS.txt
  3. 4
      lib/hachoir_metadata/jpeg.py

1
CHANGES.md

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

1
HACKS.txt

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

4
lib/hachoir_metadata/jpeg.py

@ -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":

Loading…
Cancel
Save