split header/packet sizes fixes
diff --git a/src/libusb-glue.c b/src/libusb-glue.c
index 86debd6..8d60b77 100644
--- a/src/libusb-glue.c
+++ b/src/libusb-glue.c
@@ -418,6 +418,8 @@
     toread = size - curread;
     if (toread > CONTEXT_BLOCK_SIZE)
       toread = CONTEXT_BLOCK_SIZE;
+    else if (toread > ptp_usb->outep_maxpacket)
+      toread -= toread % ptp_usb->outep_maxpacket;
 
     result = USB_BULK_READ(ptp_usb->handle, ptp_usb->inep, (char*)bytes, toread, ptpcam_usb_timeout);
     if (result == 0) {