Commit 39080c97 authored by xians@chromium.org's avatar xians@chromium.org

Check the sample rate before passing the device specific audio params to webrtc audio renderer.

This fixes the problem on some platforms where it does not support query the audio params of specific device.

R=tommi@chromium.org

Review URL: https://codereview.chromium.org/23742005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222230 0039d316-1c4b-4281-b951-d872f2087c98
parent c8a742f5
...@@ -700,8 +700,10 @@ bool MediaStreamImpl::GetAuthorizedDeviceInfoForAudioRenderer( ...@@ -700,8 +700,10 @@ bool MediaStreamImpl::GetAuthorizedDeviceInfoForAudioRenderer(
} }
} }
if (session_id_str.isEmpty() || !device_info) if (session_id_str.isEmpty() || !device_info ||
!device_info->device.matched_output.sample_rate) {
return false; return false;
}
base::StringToInt(UTF16ToUTF8(session_id_str), session_id); base::StringToInt(UTF16ToUTF8(session_id_str), session_id);
*output_sample_rate = device_info->device.matched_output.sample_rate; *output_sample_rate = device_info->device.matched_output.sample_rate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment