Consider DQT frame as JFIF (ignore and get just the size).
authorbarbieri <barbieri@gmail.com>
Mon, 17 Dec 2007 21:16:38 +0000 (21:16 +0000)
committerbarbieri <barbieri@gmail.com>
Mon, 17 Dec 2007 21:16:38 +0000 (21:16 +0000)
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

index 285ed7a..e140feb 100644 (file)
@@ -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);