Index: webrtc/sdk/android/src/jni/videoencoderwrapper.cc |
diff --git a/webrtc/sdk/android/src/jni/videoencoderwrapper.cc b/webrtc/sdk/android/src/jni/videoencoderwrapper.cc |
index 2b87d67c0bef80ff7fe1cbab25fb9a206e81522a..cf3bd90bc619dab18938737f5961594268496435 100644 |
--- a/webrtc/sdk/android/src/jni/videoencoderwrapper.cc |
+++ b/webrtc/sdk/android/src/jni/videoencoderwrapper.cc |
@@ -97,8 +97,6 @@ VideoEncoderWrapper::VideoEncoderWrapper(JNIEnv* jni, jobject j_encoder) |
implementation_name_ = GetImplementationName(jni); |
- encoder_queue_ = rtc::TaskQueue::Current(); |
- |
initialized_ = false; |
num_resets_ = 0; |
@@ -116,6 +114,7 @@ int32_t VideoEncoderWrapper::InitEncode(const VideoCodec* codec_settings, |
number_of_cores_ = number_of_cores; |
codec_settings_ = *codec_settings; |
num_resets_ = 0; |
+ encoder_queue_ = rtc::TaskQueue::Current(); |
return InitEncodeInternal(jni); |
} |
@@ -167,6 +166,7 @@ int32_t VideoEncoderWrapper::Release() { |
jobject ret = jni->CallObjectMethod(*encoder_, release_method_); |
frame_extra_infos_.clear(); |
initialized_ = false; |
+ encoder_queue_ = nullptr; |
return HandleReturnCode(jni, ret); |
} |