From a6d508079f8046275fe9a1a98fb3cd1b0f6a70f5 Mon Sep 17 00:00:00 2001 From: Tomas Mandys Date: Thu, 30 Jan 2025 21:28:42 +0100 Subject: [PATCH] Sony A7 II&III: when using USB Live preview and capture then there is race in an event and 2nd capture freezes camera --- camlibs/ptp2/library.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/camlibs/ptp2/library.c b/camlibs/ptp2/library.c index 172e698da..f68646027 100644 --- a/camlibs/ptp2/library.c +++ b/camlibs/ptp2/library.c @@ -4994,9 +4994,13 @@ camera_sony_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat if (ptp_get_one_event(params, &event)) { GP_LOG_D ("during wait for image event.code=%04x Param1=%08x", event.Code, event.Param1); if (event.Code == PTP_EC_Sony_ObjectAdded) { - newobject = event.Param1; - GP_LOG_D ("SONY ObjectAdded received, ending wait"); - break; + if (params->deviceinfo.Model && !strncmp(params->deviceinfo.Model, "ILCE-7", 6)) { + GP_LOG_D ("SONY ObjectAdded received, waiting for poll flag"); + } else { + newobject = event.Param1; + GP_LOG_D ("SONY ObjectAdded received, ending wait"); + break; + } } } #endif