projects
/
lms
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Consider DQT frame as JFIF (ignore and get just the size).
[lms]
/
lightmediascanner
/
src
/
plugins
/
jpeg
/
jpeg.c
diff --git
a/lightmediascanner/src/plugins/jpeg/jpeg.c
b/lightmediascanner/src/plugins/jpeg/jpeg.c
index
f32e397
..
e140feb
100644
(file)
--- a/
lightmediascanner/src/plugins/jpeg/jpeg.c
+++ b/
lightmediascanner/src/plugins/jpeg/jpeg.c
@@
-47,10
+47,15
@@
enum {
JPEG_MARKER_SOI = 0xd8,
enum {
JPEG_MARKER_SOI = 0xd8,
+ JPEG_MARKER_DQT = 0xdb,
JPEG_MARKER_JFIF = 0xe0,
JPEG_MARKER_EXIF = 0xe1,
JPEG_MARKER_COMM = 0xfe,
JPEG_MARKER_SOF0 = 0xc0,
JPEG_MARKER_JFIF = 0xe0,
JPEG_MARKER_EXIF = 0xe1,
JPEG_MARKER_COMM = 0xfe,
JPEG_MARKER_SOF0 = 0xc0,
+ JPEG_MARKER_SOF1 = 0xc1,
+ JPEG_MARKER_SOF2 = 0xc2,
+ JPEG_MARKER_SOF9 = 0xc9,
+ JPEG_MARKER_SOF10 = 0xca,
JPEG_MARKER_SOS = 0xda
};
JPEG_MARKER_SOS = 0xda
};
@@
-144,7
+149,11
@@
_jpeg_info_get(int fd, int len, struct lms_image_info *info)
return -3;
}
return -3;
}
- if (buf[1] == JPEG_MARKER_SOF0) {
+ if (buf[1] == JPEG_MARKER_SOF0 ||
+ buf[1] == JPEG_MARKER_SOF1 ||
+ buf[1] == JPEG_MARKER_SOF2 ||
+ buf[1] == JPEG_MARKER_SOF9 ||
+ buf[1] == JPEG_MARKER_SOF10) {
if (_jpeg_sof_process(fd, &info->width, &info->height) != 0)
return -4;
found++;
if (_jpeg_sof_process(fd, &info->width, &info->height) != 0)
return -4;
found++;
@@
-617,7
+626,7
@@
_parse(struct plugin *plugin, struct lms_context *ctxt, const struct lms_file_in
r = -3;
goto done;
}
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);
if (_jfif_data_get(fd, len, &info) != 0) {
fprintf(stderr, "ERROR: could not get JPEG size (%s).\n",
finfo->path);