Skip to content

Commit

Permalink
allow for source buffer to be larger than srcFrameInfo size since som…
Browse files Browse the repository at this point in the history
…e drivers do not reallocate after binning the frame
  • Loading branch information
knro committed Oct 2, 2024
1 parent d122fb1 commit c7cb615
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libs/indibase/stream/streammanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,13 @@ void StreamManagerPrivate::asyncStreamThread()

std::vector<uint8_t> *sourceBuffer = &sourceTimeFrame.frame;

if (PixelFormat != INDI_JPG && sourceBuffer->size() != srcFrameInfo.totalSize())
// Source buffer size may be equal or larger than frame info size
// as some driver still retain full unbinned window size even when binning the output
// frame
if (PixelFormat != INDI_JPG && sourceBuffer->size() < srcFrameInfo.totalSize())
{
LOG_ERROR("Invalid source buffer size, skipping frame...");
LOGF_ERROR("Source buffer size %d is less than frame size %d, skipping frame...", sourceBuffer->size(),
srcFrameInfo.totalSize());
continue;
}

Expand Down

0 comments on commit c7cb615

Please sign in to comment.