Skip to content

Commit

Permalink
Init objectinfo, as otherwise we might have lingering uninit data. #1058
Browse files Browse the repository at this point in the history
  • Loading branch information
msmeissn committed Nov 12, 2024
1 parent 59d55a5 commit 5c8da2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions camlibs/ptp2/library.c
Original file line number Diff line number Diff line change
Expand Up @@ -4879,6 +4879,7 @@ camera_sony_capture (Camera *camera, CameraCaptureType type, CameraFilePath *pat
struct timeval event_start;
int ret;

memset(&oi,0,sizeof(oi));
if (params->deviceinfo.Model && (
!strcmp(params->deviceinfo.Model, "ZV-E10") ||
!strcmp(params->deviceinfo.Model, "ZV-1") ||
Expand Down Expand Up @@ -5059,6 +5060,7 @@ camera_sony_qx_capture (Camera *camera, CameraCaptureType type, CameraFilePath *

C_PTP (ptp_generic_getdevicepropdesc (params, PTP_DPC_SONY_QX_OperatingMode, &dpd));

memset(&oi,0,sizeof(oi));
while (dpd.CurrentValue.u8 != 2) {
propval.u8 = 2; /* 2 is Still Capture */
C_PTP (ptp_sony_qx_setdevicecontrolvaluea (params, PTP_DPC_SONY_QX_OperatingMode, &propval, PTP_DTC_UINT8));
Expand Down

0 comments on commit 5c8da2d

Please sign in to comment.