Skip to content

Commit bd44fd8

Browse files
committed
SGDecodeContext: Release frame output lock.
1 parent a63cab7 commit bd44fd8

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

SGPlayer/Classes/Core/SGDecoder/SGDecodeContext.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ - (void)predecode:(SGBlock)lock unlock:(SGBlock)unlock
100100
self->_predecoder = [[self->_decoderClass alloc] init];
101101
self->_predecoder.options = self->_options;
102102
}
103+
unlock();
103104
self->_predecodeFrames = [self->_predecoder decode:packet];
105+
lock();
104106
[packet unlock];
105107
}
106108
}

SGPlayer/Classes/Core/SGDecoder/SGDecodeLoop.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ - (void)runningThread
313313
}
314314
[context predecode:lock unlock:unlock];
315315
[self->_lock unlock];
316-
[NSThread sleepForTimeInterval:0.001];
317316
continue;
318317
} else if (self->_flags.state == SGDecodeLoopStateDecoding) {
319318
SGDecodeContext *context = [self currentDecodeContext];

0 commit comments

Comments
 (0)