Skip to content

Commit

Permalink
Merge branch 'master' into dl/merge_master
Browse files Browse the repository at this point in the history
  • Loading branch information
davidliu committed Jun 24, 2024
2 parents 24e9ab1 + cde6b51 commit 670c0ee
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ public WebRTCModule(ReactApplicationContext reactContext) {
.setVideoDecoderFactory(decoderFactory)
.createPeerConnectionFactory();

// PeerConnectionFactory now owns the adm native pointer, and we don't need it anymore.
adm.release();

// Saving the encoder and decoder factories to get codec info later when needed.
mVideoEncoderFactory = encoderFactory;
mVideoDecoderFactory = decoderFactory;
Expand All @@ -116,14 +119,6 @@ public String getName() {
return "WebRTCModule";
}

@Override
public void onCatalystInstanceDestroy() {
if (mAudioDeviceModule != null) {
mAudioDeviceModule.release();
}
super.onCatalystInstanceDestroy();
}

private PeerConnection getPeerConnection(int id) {
PeerConnectionObserver pco = mPeerConnectionObservers.get(id);
return (pco == null) ? null : pco.getPeerConnection();
Expand Down

0 comments on commit 670c0ee

Please sign in to comment.