only try the "partial download" trick for JPEG/EXIF images.

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8373 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2005-12-30 11:43:44 +00:00
parent d2821599f9
commit 3ec70eeb5d
2 changed files with 11 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2005-12-30 Marcus Meissner <marcus@jet.franken.de>
* library.c: Only allow getpartialobject for EXIF
JPEG images.
2005-12-29 Marcus Meissner <marcus@jet.franken.de>
* ptp.c, ptp.h, library.c:

View File

@@ -3569,7 +3569,12 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename,
/* Device may hang is a partial read is attempted beyond the file */
if (oi->ObjectCompressedSize < 10)
return (GP_ERROR_NOT_SUPPORTED);
/* could also use Canon partial downloads */
/* We only support JPEG / EXIF format ... others might hang. */
if (oi->ObjectFormat != PTP_OFC_EXIF_JPEG)
return (GP_ERROR_NOT_SUPPORTED);
/* Note: Could also use Canon partial downloads */
CPR (context, ptp_getpartialobject (params,
params->handles.Handler[object_id],
0, 10, &ximage));