diff options
-rw-r--r-- | hw/usb/dev-audio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index ee43e4914d..28ac7c5165 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -321,6 +321,9 @@ static int streambuf_put(struct streambuf *buf, USBPacket *p) if (!free) { return 0; } + if (p->iov.size != USBAUDIO_PACKET_SIZE) { + return 0; + } assert(free >= USBAUDIO_PACKET_SIZE); usb_packet_copy(p, buf->data + (buf->prod % buf->size), USBAUDIO_PACKET_SIZE); |