Skip to content

Commit b48b61a

Browse files
committed
转换器内存释放
Change-Id: I7d4abce9abe2f7d865cadc5779767e27f5730e42
1 parent 3821c05 commit b48b61a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoPreviewDeviceVC.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ - (void)getDeviceStatusWithType:(NSString *)singleType qualityType:(NSString *)q
260260
// [[TIoTCoreXP2PBridge sharedInstance] sendVoiceToServer:weakSelf.deviceName?:@"" channel:channel];
261261
[[TIoTSessionManager sharedInstance] resumeRTCAudioSession];
262262

263-
static int tt_pitch = 2; //2 萝莉 3大叔
263+
static int tt_pitch = 3; //2 萝莉 3大叔
264264
TIoTCoreAudioConfig *audio_config = [TIoTCoreAudioConfig new];
265-
audio_config.refreshSession = NO;
265+
audio_config.refreshSession = YES;
266266
audio_config.sampleRate = TIoTAVCaptionFLVAudio_16;
267267
audio_config.channels = 1;
268268
audio_config.isEchoCancel = YES;

Source/SDK/LinkVideo/FLV/TIoTAACEncoder.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,13 @@ - (void) encodeSampleBuffer:(CMSampleBufferRef)sampleBuffer {
231231
});
232232
}
233233

234-
234+
- (void)dealloc {
235+
ConverterContext *cxt = self->convertContext;
236+
if (cxt && cxt->converter) {
237+
AudioConverterDispose(cxt->converter);
238+
cxt->converter = NULL;
239+
}
240+
}
235241
#pragma mark - HEADER
236242
/**
237243
* Add ADTS header at the beginning of each and every AAC packet.

0 commit comments

Comments
 (0)