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

Unified Diff: content/renderer/media_recorder/video_track_recorder.cc

Issue 2775453003: Fix multiple Initialize() calls and reenable VEA usage in MediaRecorder for Win8 (Closed)
Patch Set: Drop all frames. Created 3 years, 9 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_recorder/video_track_recorder.cc
diff --git a/content/renderer/media_recorder/video_track_recorder.cc b/content/renderer/media_recorder/video_track_recorder.cc
index 3b1b0a5578ee8617ee68c64058455517a096172e..c18c3683c7573cdbe88d66df3cad5ad0737fa65f 100644
--- a/content/renderer/media_recorder/video_track_recorder.cc
+++ b/content/renderer/media_recorder/video_track_recorder.cc
@@ -30,10 +30,6 @@
#include "third_party/libyuv/include/libyuv.h"
#include "ui/gfx/geometry/size.h"
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
#if BUILDFLAG(RTC_USE_H264)
#include "third_party/openh264/src/codec/api/svc/codec_api.h"
#include "third_party/openh264/src/codec/api/svc/codec_app_def.h"
@@ -121,12 +117,6 @@ CodecEnumerator::CodecEnumerator() {
return;
#endif
-#if defined(OS_WIN)
- // See https://crbug.com/698441.
- if (base::win::GetVersion() < base::win::VERSION_WIN10)
- return;
-#endif
-
content::RenderThreadImpl* const render_thread_impl =
content::RenderThreadImpl::current();
if (!render_thread_impl) {
@@ -1303,6 +1293,11 @@ void VideoTrackRecorder::InitializeEncoder(
DVLOG(3) << __func__ << frame->visible_rect().size().ToString();
DCHECK(main_render_thread_checker_.CalledOnValidThread());
+ // Avoid reinitializing |encoder_| when there are multiple frames sent to the
+ // sink to initialize, https://crbug.com/698441.
+ if (encoder_)
+ return;
+
MediaStreamVideoSink::DisconnectFromTrack();
const gfx::Size& input_size = frame->visible_rect().size();
« 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