Merge branch 'beta'

This commit is contained in:
Isaac 2024-12-24 15:03:41 +08:00
commit 3b381bb579
2 changed files with 7 additions and 0 deletions

View File

@ -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 {

View File

@ -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