[Position Slider] Fix invalid duration setting
Fix NaN condition occurring when an invalid file is played. Signed-off-by: Christopher Snowhill <kode54@gmail.com>swiftingly
parent
55c623c9a0
commit
e5ff6cd23d
|
@ -18,6 +18,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setMaxValue:(double)value {
|
- (void)setMaxValue:(double)value {
|
||||||
|
if(isnan(value) || isinf(value)) value = 0.0; // Clip invalid values from bad file playlist entries
|
||||||
|
|
||||||
self.positionTextField.duration = (long)value;
|
self.positionTextField.duration = (long)value;
|
||||||
|
|
||||||
[super setMaxValue:value];
|
[super setMaxValue:value];
|
||||||
|
|
Loading…
Reference in New Issue