mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 09:20:08 +00:00
Return EOF when fetchedCount == 0
This commit is contained in:
parent
3bd97fcd34
commit
7cbf77c2b6
@ -184,6 +184,10 @@ private func readPacketCallback(userData: UnsafeMutableRawPointer?, buffer: Unsa
|
|||||||
}
|
}
|
||||||
fetchedCount = Int32(fetchedData.count)
|
fetchedCount = Int32(fetchedData.count)
|
||||||
context.readingOffset += Int64(fetchedCount)
|
context.readingOffset += Int64(fetchedCount)
|
||||||
|
|
||||||
|
if fetchedCount == 0 {
|
||||||
|
return FFMPEG_CONSTANT_AVERROR_EOF
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if context.closed {
|
if context.closed {
|
||||||
|
|||||||
@ -70,6 +70,9 @@ private func readPacketCallback(userData: UnsafeMutableRawPointer?, buffer: Unsa
|
|||||||
}
|
}
|
||||||
let fetchedCount = Int32(fetchedData.count)
|
let fetchedCount = Int32(fetchedData.count)
|
||||||
context.readingOffset += Int64(fetchedCount)
|
context.readingOffset += Int64(fetchedCount)
|
||||||
|
if fetchedCount == 0 {
|
||||||
|
return FFMPEG_CONSTANT_AVERROR_EOF
|
||||||
|
}
|
||||||
return fetchedCount
|
return fetchedCount
|
||||||
} else {
|
} else {
|
||||||
return FFMPEG_CONSTANT_AVERROR_EOF
|
return FFMPEG_CONSTANT_AVERROR_EOF
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user