Skip to content

Commit 4f4daa4

Browse files
committed
Stop depth stream before destroying registration - fixes #373
Signed-off-by: Benn Snyder <[email protected]>
1 parent cc9ecfb commit 4f4daa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cameras.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,6 @@ int freenect_stop_depth(freenect_device *dev)
10481048
return -1;
10491049

10501050
dev->depth.running = 0;
1051-
freenect_destroy_registration(&(dev->registration));
10521051
write_register(dev, 0x06, 0x00); // stop depth stream
10531052

10541053
res = fnusb_stop_iso(&dev->usb_cam, &dev->depth_isoc);
@@ -1057,6 +1056,7 @@ int freenect_stop_depth(freenect_device *dev)
10571056
return res;
10581057
}
10591058

1059+
freenect_destroy_registration(&(dev->registration));
10601060
stream_freebufs(ctx, &dev->depth);
10611061
return 0;
10621062
}

0 commit comments

Comments
 (0)