Revert "[MediaRecorder] Fix corrupted video problem with pause/resume spamming."
This reverts commit b7dab9dc. Reason for revert: caused crbug.com/1065827 which is more severe. Original change's description: > [MediaRecorder] Fix corrupted video problem with pause/resume spamming. > > > This CL fixes an issue caused by the following sequence of events: > 1. MediaRecorderHandler::Pause(): recording_ = false > 2. MediaRecorderHandler::WriteData(): if (!recording_) return > > The problem is that the WriteData() invocation was decided to > happen while the recorder was still resumed. In that state, wholes > would be produced which are not tolerated by vpx_encoder, which > interprets those as corrupted. > > The fix reverts the semantic of the code to when the class was not under > oilpan and would require manual memory management and restores the > "invalidation" semantic from when the class was using a weak ptr. > In fact, the weak reference would be invalidated hence making the > callbacks no-ops. To keep the same semantic, this CL introduces a > boolean and avoids overloading the meaning of 'recording_' > > This should also not require calling Pause() in Stop(), as all callbacks > will not do anything after Stop() is called. > > Fixed: 1060358 > Change-Id: I88b0aeb10fd13034412f3689648cebd1df40d6bf > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2106072 > Commit-Queue: Armando Miraglia <armax@chromium.org> > Reviewed-by: Markus Handell <handellm@google.com> > Cr-Commit-Position: refs/heads/master@{#752838} TBR=armax@chromium.org,handellm@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Id8a148253433576469cd7958addf48afdabf44eb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2128070Reviewed-by:Armando Miraglia <armax@chromium.org> Commit-Queue: Armando Miraglia <armax@chromium.org> Cr-Commit-Position: refs/heads/master@{#754872}
Showing
Please register or sign in to comment