summaryrefslogtreecommitdiff
path: root/camlibs
diff options
context:
space:
mode:
authorDaniel Schulte <trilader@schroedingers-bit.net>2021-04-22 16:17:59 +0200
committerMarcus Meissner <meissner@suse.de>2021-04-22 17:05:05 +0200
commitefbe4bcca4f3917450920e4841b77f31d1df60b6 (patch)
treee39f17274a52771ce30b477e7554ab364948f716 /camlibs
parentb7615e0cb36195021ea3927079f4cb6952f61b37 (diff)
downloadlibgphoto2-efbe4bcca4f3917450920e4841b77f31d1df60b6.tar.gz
camlibs/ptp2: fuji: Ignore added preview object while live-view is active
If the object isn't ignored camera_capture_preview will fight with the usage of camera_wait_for_event for tethering applications that automatically download and delete images taken by the camera when reported via GP_EVENT_FILE_ADDED.
Diffstat (limited to 'camlibs')
-rw-r--r--camlibs/ptp2/library.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c
index a7a1267ae..0e53f92d1 100644
--- a/camlibs/ptp2/library.c
+++ b/camlibs/ptp2/library.c
@@ -6944,6 +6944,8 @@ sonyout:
goto handleregular;
C_PTP (ptp_getobjecthandles (params, PTP_HANDLER_SPECIAL, 0x000000, 0x000000, &handles));
for (i=handles.n;i--;) {
+ if (params->inliveview == 1 && handles.Handler[i] == 0x80000001) /* Ignore preview image object handle while liveview is active */
+ continue;
if (PTP_RC_OK == ptp_object_find (params, handles.Handler[i], &oi)) /* already have it */
continue;
event.Code = PTP_EC_ObjectAdded;