Skip to content

Commit

Permalink
修复播放完毕后崩溃的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengwenming committed Jan 16, 2020
1 parent 8c33058 commit 521a873
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion WNPlayer/DetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ - (void)viewDidLoad {
contrlView.title = @"测试播放wmv";
contrlView.coverImageView.image = [UIImage imageNamed:@"cover"];
self.wnPlayer.controlView = contrlView;
// self.wnPlayer.urlString = @"http://updatedown.heikeyun.net/WMV%E6%96%87%E4%BB%B6%E8%A7%86%E9%A2%91%E6%B5%8B%E8%AF%95.wmv";
// self.wnPlayer.urlString = @"rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov";
self.wnPlayer.urlString = @"http://mov.bn.netease.com/mobilev/open/nos/mp4/2015/12/09/SB9F77DEA_sd.mp4";

Expand Down
4 changes: 2 additions & 2 deletions WNPlayer/WNPlayer/WNPlayerManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ - (void)close {
- (void)play {
if (!self.opened || self.playing) return;
self.playing = YES;
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5)), dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1)), dispatch_get_main_queue(), ^{
[self render];
[self startFrameReaderThread];
// });
});

NSError *error = nil;
if (![self.audioManager play:&error]) {
Expand Down

0 comments on commit 521a873

Please sign in to comment.