From ca37cf669174184b5139ffd0141bf7f6c0fc7894 Mon Sep 17 00:00:00 2001 From: tommi Date: Sat, 11 Mar 2017 04:54:06 -0800 Subject: [PATCH] Don't set the priority of the decoder to 'high' on Android. Doing so competes with the actual decoding that happens on a different thread. BUG=695438 Review-Url: https://codereview.webrtc.org/2745813003 Cr-Commit-Position: refs/heads/master@{#17184} --- webrtc/video/video_receive_stream.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc index eb2404c174..be623cef56 100644 --- a/webrtc/video/video_receive_stream.cc +++ b/webrtc/video/video_receive_stream.cc @@ -310,7 +310,14 @@ void VideoReceiveStream::Start() { call_stats_->RegisterStatsObserver(video_stream_decoder_.get()); // Start the decode thread decode_thread_.Start(); +#if !defined(WEBRTC_ANDROID) + // On android, the decoding happens on a different thread and frames + // are delivered on that thread (that in itself needs to be fixed). + // In any event, the actual decoding work is higher priority than the + // |decode_thread_| on Android, so we only raise the deocode priority on + // platforms other than Android. decode_thread_.SetPriority(rtc::kHighestPriority); +#endif rtp_stream_receiver_.StartReceive(); }