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:
@@ -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:
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user