Fix 'Invalid number value (NaN) in JSON write' crash
This commit is contained in:
parent
3ac8d2e74a
commit
0927cee27b
@ -96,9 +96,12 @@ static NSString *const statusKeyPath = @"status";
|
|||||||
*stop = YES;
|
*stop = YES;
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
return [NSNumber numberWithFloat:CMTimeGetSeconds(CMTimeRangeGetEnd(effectiveTimeRange))];
|
Float64 playableDuration = CMTimeGetSeconds(CMTimeRangeGetEnd(effectiveTimeRange));
|
||||||
|
if (playableDuration > 0) {
|
||||||
|
return [NSNumber numberWithFloat:playableDuration];
|
||||||
}
|
}
|
||||||
return [NSNumber numberWithFloat:CMTimeGetSeconds(kCMTimeInvalid)];
|
}
|
||||||
|
return [NSNumber numberWithInteger:0];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)stopProgressTimer
|
- (void)stopProgressTimer
|
||||||
|
Loading…
Reference in New Issue
Block a user