mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Return EOF when fetchedCount == 0
This commit is contained in:
parent
3bd97fcd34
commit
7cbf77c2b6
2 changed files with 7 additions and 0 deletions
|
|
@ -184,6 +184,10 @@ private func readPacketCallback(userData: UnsafeMutableRawPointer?, buffer: Unsa
|
|||
}
|
||||
fetchedCount = Int32(fetchedData.count)
|
||||
context.readingOffset += Int64(fetchedCount)
|
||||
|
||||
if fetchedCount == 0 {
|
||||
return FFMPEG_CONSTANT_AVERROR_EOF
|
||||
}
|
||||
}
|
||||
|
||||
if context.closed {
|
||||
|
|
|
|||
|
|
@ -70,6 +70,9 @@ private func readPacketCallback(userData: UnsafeMutableRawPointer?, buffer: Unsa
|
|||
}
|
||||
let fetchedCount = Int32(fetchedData.count)
|
||||
context.readingOffset += Int64(fetchedCount)
|
||||
if fetchedCount == 0 {
|
||||
return FFMPEG_CONSTANT_AVERROR_EOF
|
||||
}
|
||||
return fetchedCount
|
||||
} else {
|
||||
return FFMPEG_CONSTANT_AVERROR_EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue