Skip to content

Commit 8aec869

Browse files
committed
fix bug
1 parent 75ee0b3 commit 8aec869

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

VideoPlsUtilsPlatformSDK/VideoPlsUtilsPlatformSDK/VideoPlsUtilsPlatformSDK/Common/Player/VPUPAVAssetResourceLoader.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ - (BOOL)respondWithDataForRequest:(AVAssetResourceLoadingDataRequest *)dataReque
123123
NSData *filedata = [NSData dataWithContentsOfURL:[NSURL fileURLWithPath:self.tempVideoPath] options:NSDataReadingMappedIfSafe error:nil];
124124

125125
// This is the total data we have from startOffset to whatever has been downloaded so far
126-
NSUInteger unreadBytes = self.task.cacheLength - ((NSInteger)startOffset - self.task.offset);
126+
NSUInteger unreadBytes = filedata.length - ((NSInteger)startOffset - self.task.offset);
127127

128128
// Respond with whatever is available if we can't satisfy the request fully yet
129129
NSUInteger numberOfBytesToRespondWith = MIN((NSUInteger)dataRequest.requestedLength, unreadBytes);

0 commit comments

Comments
 (0)