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

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

Issue 2004723002: Handle ReadyStateEnded in MediaRecorderHandler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_recorder_handler.cc
diff --git a/content/renderer/media/media_recorder_handler.cc b/content/renderer/media/media_recorder_handler.cc
index 46dc73625fc727b5db039af94227cd5221201446..e1fa425c55b13801b0cb9b13f8c0bedbcad233c6 100644
--- a/content/renderer/media/media_recorder_handler.cc
+++ b/content/renderer/media/media_recorder_handler.cc
@@ -177,6 +177,11 @@ bool MediaRecorderHandler::start(int timeslice) {
audio_tracks[0].source().getReadyState() !=
blink::WebMediaStreamSource::ReadyStateEnded;
+ if (!use_video_tracks && !use_audio_tracks) {
+ LOG(WARNING) << __FUNCTION__ << ": no tracks to be recorded.";
+ return false;
+ }
+
webm_muxer_.reset(new media::WebmMuxer(
CodecIdToMediaVideoCodec(codec_id_), use_video_tracks, use_audio_tracks,
base::Bind(&MediaRecorderHandler::WriteData,
« 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