We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 730d29e commit ca4fe2aCopy full SHA for ca4fe2a
1 file changed
SGPlayer/Classes/Core/SGDecoder/SGVideoDecoder.m
@@ -91,7 +91,7 @@ - (void)flush
91
SGCodecDescriptor *cd = packet.codecDescriptor;
92
NSAssert(cd, @"Invalid Codec Descriptor.");
93
if (![cd isEqualCodecContextToDescriptor:self->_codecDescriptor]) {
94
- NSArray<SGFrame *> *objs = [self processPacket:nil];
+ NSArray<SGFrame *> *objs = [self finish];
95
for (SGFrame *obj in objs) {
96
[ret addObject:obj];
97
}
@@ -108,9 +108,9 @@ - (void)flush
108
109
110
111
- if (ret.firstObject) {
+ if (ret.lastObject) {
112
[self->_lastOutputFrame unlock];
113
- self->_lastOutputFrame = ret.firstObject;
+ self->_lastOutputFrame = ret.lastObject;
114
[self->_lastOutputFrame lock];
115
116
self->_flags.outputCount += ret.count;
0 commit comments