Skip to content

Commit

Permalink
[MediaRecorder] Resume WebmMuxer only if not null
Browse files Browse the repository at this point in the history
There are some cases in which the muxer is null, which lead to crashes.

Bug: 954494
Change-Id: I571d54d56c71d7a674054979a441e6645bc5ac3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578614
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653191}
  • Loading branch information
Guido Urdaneta authored and Commit Bot committed Apr 23, 2019
1 parent e43d3b2 commit bb460bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/renderer/media_recorder/media_recorder_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ void MediaRecorderHandler::Resume() {
video_recorder->Resume();
for (const auto& audio_recorder : audio_recorders_)
audio_recorder->Resume();
webm_muxer_->Resume();
if (webm_muxer_)
webm_muxer_->Resume();
}

void MediaRecorderHandler::EncodingInfo(
Expand Down

0 comments on commit bb460bf

Please sign in to comment.