USB-Eyetoy: Fix unused comprLen warning

But this also has a behavioural change.
This commit is contained in:
Stenzek 2024-05-15 22:46:24 +10:00 committed by Connor McLaughlin
parent 75894501ee
commit 967a41c035
1 changed files with 2 additions and 2 deletions

View File

@ -392,7 +392,7 @@ namespace usb_eyetoy
{
const size_t comprLen = jo_write_mpeg(
comprBuf.data(), data, frame_width, frame_height, JO_BGR24, mirroring_enabled ? JO_FLIP_X : JO_NONE, JO_FLIP_Y);
comprBuf.resize(comprBufSize);
comprBuf.resize(comprLen);
}
else if (frame_format == format_jpeg)
{
@ -472,7 +472,7 @@ namespace usb_eyetoy
if (frame_format == format_mpeg)
{
const size_t comprLen = jo_write_mpeg(comprBuf.data(), rgbData, frame_width, frame_height, JO_RGB24, JO_NONE, JO_NONE);
comprBuf.resize(comprBufSize);
comprBuf.resize(comprLen);
}
else if (frame_format == format_jpeg)
{