Skip to content

Commit

Permalink
Fix deadlock in audio for notification repacking.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jan 27, 2025
1 parent f1019c8 commit 3cebd6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Telegram/SourceFiles/ffmpeg/ffmpeg_bytes_io_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3cebd6d

Please sign in to comment.