Fix deadlock in audio for notification repacking.

This commit is contained in:
John Preston 2025-01-27 18:10:38 +04:00
parent f1019c8ca4
commit 3cebd6d923

View file

@ -21,7 +21,9 @@ struct ReadBytesWrap {
const auto toRead = std::min(
int64(buf_size),
wrap->size - wrap->offset);
if (toRead > 0) {
if (!toRead) {
return AVERROR_EOF;
} else if (toRead > 0) {
memcpy(buf, wrap->data + wrap->offset, toRead);
wrap->offset += toRead;
}