commit | dc8fc722048bd9330e6f3bfdb9e6d0eaf87cec3b | [log] [tgz] |
---|---|---|
author | Johnny <hellojinqiang@gmail.com> | Tue Sep 14 03:28:17 2021 |
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Sep 14 09:15:22 2021 |
tree | e5adad524996994c329a2d2bba551cf513d0f1d0 | |
parent | 99c6ca0e668b87eba795a5b1fc6b921ac644d904 [diff] |
Fix potential crash during SimulcastEncoderAdapter tear down. On the Android and iOS platforms, occasionally crash when using the SimulcastEncoderAdapter. The Android platform reverted, In function `SimulcastEncoderAdapter::EncoderContext::Release`, After executing `encoder_->RegisterEncodeCompleteCallback(nullptr)` before execute `encoder_->Release()` If the encoder thread is executed here, ``` // out/xxx/xxx/gen/sdk/android/generated_video_jni/VideoEncoderWrapper_jni.h JNI_GENERATOR_EXPORT void Java_org_webrtc_VideoEncoderWrapper_nativeOnEncodedFrame( JNIEnv* env, jclass jcaller, jlong nativeVideoEncoderWrapper, jobject frame) { VideoEncoderWrapper* native = reinterpret_cast<VideoEncoderWrapper*>(nativeVideoEncoderWrapper); CHECK_NATIVE_PTR(env, jcaller, native, "OnEncodedFrame"); return native->OnEncodedFrame(env, base::android::JavaParamRef<jobject>(env, frame)); // HERE } ``` it will cause `native` to nullptr. iOS also. Bug: webrtc:13156 Change-Id: Id5563b3fa2c11606ae7b35de56bbaa6adba59b14 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231780 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#34989}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.