From 8ebbf9999e4c53cec77575ec78386b606c9b50b9 Mon Sep 17 00:00:00 2001 From: barbieri Date: Mon, 17 Dec 2007 21:16:38 +0000 Subject: [PATCH] Consider DQT frame as JFIF (ignore and get just the size). If DQT frame is found, then no extra information is available, consider like JFIF and go straight to image dimension. --- lightmediascanner/src/plugins/jpeg/jpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lightmediascanner/src/plugins/jpeg/jpeg.c b/lightmediascanner/src/plugins/jpeg/jpeg.c index 285ed7a..e140feb 100644 --- a/lightmediascanner/src/plugins/jpeg/jpeg.c +++ b/lightmediascanner/src/plugins/jpeg/jpeg.c @@ -47,6 +47,7 @@ enum { JPEG_MARKER_SOI = 0xd8, + JPEG_MARKER_DQT = 0xdb, JPEG_MARKER_JFIF = 0xe0, JPEG_MARKER_EXIF = 0xe1, JPEG_MARKER_COMM = 0xfe, @@ -625,7 +626,7 @@ _parse(struct plugin *plugin, struct lms_context *ctxt, const struct lms_file_in r = -3; goto done; } - } else if (type == JPEG_MARKER_JFIF) { + } else if (type == JPEG_MARKER_JFIF || type == JPEG_MARKER_DQT) { if (_jfif_data_get(fd, len, &info) != 0) { fprintf(stderr, "ERROR: could not get JPEG size (%s).\n", finfo->path); -- 1.7.9.5