Seek over EXIF APP0 frame instead of reading and discarding it
This commit is contained in:
parent
5dea695c71
commit
1b089bc2fa
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
VERSION = git-20130907
|
||||
VERSION = git-20131005
|
||||
|
||||
PREFIX = /usr/local
|
||||
MANPREFIX = $(PREFIX)/share/man
|
||||
|
3
exif.c
3
exif.c
@ -79,9 +79,10 @@ int exif_orientation(const fileinfo_t *file)
|
||||
goto abort;
|
||||
if (s_read(fd, file->name, data, 4) < 0)
|
||||
goto abort;
|
||||
|
||||
if (btous(data, order) == JPEG_MARKER_APP0) {
|
||||
len = btous(data + 2, order);
|
||||
if (s_read(fd, file->name, data, len - 2) < 0)
|
||||
if (lseek(fd, len - 2, SEEK_CUR) == (off_t) -1)
|
||||
goto abort;
|
||||
if (s_read(fd, file->name, data, 4) < 0)
|
||||
goto abort;
|
||||
|
Loading…
Reference in New Issue
Block a user