Skip to content

Commit

Permalink
Merge pull request LaiFengiOS#103 from ScottieLee/dev
Browse files Browse the repository at this point in the history
Reset compression session when encoding error occurs
  • Loading branch information
小歪~~~ authored Sep 30, 2016
2 parents 77d6a5b + 30eac12 commit d988718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LFLiveKit/coder/LFHardwareVideoEncoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ - (void)encodeVideoData:(CVPixelBufferRef)pixelBuffer timeStamp:(uint64_t)timeSt
NSNumber *timeNumber = @(timeStamp);

OSStatus status = VTCompressionSessionEncodeFrame(compressionSession, pixelBuffer, presentationTimeStamp, duration, (__bridge CFDictionaryRef)properties, (__bridge_retained void *)timeNumber, &flags);
if(status == noErr){
if(status != noErr){
[self resetCompressionSession];
}
}
Expand Down

0 comments on commit d988718

Please sign in to comment.