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

Unified Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 1223793009: Fixes to Cast use of overlays for video frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added dependency on media_base Created 5 years, 5 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 | chromecast/media/cma/filters/hole_frame_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_browser_main_parts.cc
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index 046e3ba40757bcaddb9f3902864cd358a2af9f67..d3247a844dfaf4b82f84886c6ed33bc6b58c739e 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -34,6 +34,7 @@
#include "chromecast/browser/url_request_context_factory.h"
#include "chromecast/common/platform_client_auth.h"
#include "chromecast/media/base/key_systems_common.h"
+#include "chromecast/media/base/media_message_loop.h"
#include "chromecast/net/connectivity_checker.h"
#include "chromecast/public/cast_media_shlib.h"
#include "chromecast/public/cast_sys_info.h"
@@ -324,7 +325,9 @@ void CastBrowserMainParts::PreMainMessageLoopRun() {
cast_browser_process_->SetRemoteDebuggingServer(
make_scoped_ptr(new RemoteDebuggingServer()));
- media::CastMediaShlib::Initialize(cmd_line->argv());
+ media::MediaMessageLoop::GetTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&media::CastMediaShlib::Initialize, cmd_line->argv()));
::media::InitializeMediaLibrary();
cast_browser_process_->SetCastService(CastService::Create(
@@ -390,7 +393,10 @@ void CastBrowserMainParts::PostMainMessageLoopRun() {
DeregisterKillOnAlarm();
#endif
- media::CastMediaShlib::Finalize();
+ // Finalize CastMediaShlib on media thread to ensure it's not accessed
+ // after Finalize.
+ media::MediaMessageLoop::GetTaskRunner()->PostTask(
+ FROM_HERE, base::Bind(&media::CastMediaShlib::Finalize));
}
} // namespace shell
« no previous file with comments | « no previous file | chromecast/media/cma/filters/hole_frame_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698