Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: webrtc/sdk/android/src/jni/videodecoderfactorywrapper.cc

Issue 2998293002: Make CodecType conversion functions non-optional. (Closed)
Patch Set: Keep old functions for backwards-compat Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/android/src/jni/videodecoderfactorywrapper.cc
diff --git a/webrtc/sdk/android/src/jni/videodecoderfactorywrapper.cc b/webrtc/sdk/android/src/jni/videodecoderfactorywrapper.cc
index 678dc3d48558fd2b56fcbcaf8953e161abbd91e0..4e825ada10fa175f73592c32eeb6a0b31c2c52db 100644
--- a/webrtc/sdk/android/src/jni/videodecoderfactorywrapper.cc
+++ b/webrtc/sdk/android/src/jni/videodecoderfactorywrapper.cc
@@ -30,10 +30,8 @@ webrtc::VideoDecoder* VideoDecoderFactoryWrapper::CreateVideoDecoder(
webrtc::VideoCodecType type) {
JNIEnv* jni = AttachCurrentThreadIfNeeded();
ScopedLocalRefFrame local_ref_frame(jni);
- rtc::Optional<const char*> type_payload =
- webrtc::CodecTypeToPayloadName(type);
- RTC_DCHECK(type_payload);
- jstring name = jni->NewStringUTF(*type_payload);
+ const char* type_payload = webrtc::CodecTypeToPayloadString(type);
+ jstring name = jni->NewStringUTF(type_payload);
jobject decoder =
jni->CallObjectMethod(*decoder_factory_, create_decoder_method_, name);
return decoder != nullptr ? new VideoDecoderWrapper(jni, decoder) : nullptr;

Powered by Google App Engine
This is Rietveld 408576698