Prechádzať zdrojové kódy

VLCMovieViewController: Fix seeking in live streams

Live streams have sometimes no valid duration, so setting the
`_positionSet` state only in case of `_mediaDuration > 0` leads to
an issue that seeking in such streams only works for the first time,
as `_positionSet` is initialized as NO, then it is set to YES in
`_setPositionForReal` and would be never set back to NO, causing all
future seeks to be ignored.

Fix https://code.videolan.org/videolan/VLCKit/issues/157
Marvin Scholz 6 rokov pred
rodič
commit
c3a865924f
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      Sources/VLCMovieViewController.m

+ 1 - 1
Sources/VLCMovieViewController.m

@@ -1066,8 +1066,8 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
         [self.timeNavigationTitleView.timeDisplayButton setTitle:newPosition.stringValue forState:UIControlStateNormal];
         [self.timeNavigationTitleView setNeedsLayout];
         self.timeNavigationTitleView.timeDisplayButton.accessibilityLabel = [NSString stringWithFormat:@"%@: %@", NSLocalizedString(@"PLAYBACK_POSITION", nil), newPosition.stringValue];
-        _positionSet = NO;
     }
+    _positionSet = NO;
     [self _resetIdleTimer];
 }