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

Unified Diff: content/renderer/media/media_stream_impl.cc

Issue 23742005: Check the sample rate before passing the audio params to webrtc audio renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_impl.cc
diff --git a/content/renderer/media/media_stream_impl.cc b/content/renderer/media/media_stream_impl.cc
index d3b2c7421ac3402e19fc036dcb60307bf0baa8c7..c60a220d6bd8a0556e6649969790703edf70425d 100644
--- a/content/renderer/media/media_stream_impl.cc
+++ b/content/renderer/media/media_stream_impl.cc
@@ -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;
+ }
base::StringToInt(UTF16ToUTF8(session_id_str), session_id);
*output_sample_rate = device_info->device.matched_output.sample_rate;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698