Ignore undecodeable GIFs in MOBI files

This commit is contained in:
Kovid Goyal 2022-05-02 16:48:19 +05:30
parent 6d1f2989d1
commit 03d9c2dbc4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -915,6 +915,8 @@ class MobiReader:
imgfmt = 'png'
except AnimatedGIF:
pass
except OSError:
continue
path = os.path.join(output_dir, '%05d.%s' % (image_index, imgfmt))
image_name_map[image_index] = os.path.basename(path)
if imgfmt == 'png':