summaryrefslogtreecommitdiffstats
path: root/media/cast
diff options
context:
space:
mode:
authorimcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-11 05:54:17 +0000
committerimcheng@chromium.org <imcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-11 05:54:17 +0000
commit1acec0ced6bf1beeb39639059f4820a4bff098e3 (patch)
tree196202953cdb1976506691480eaa0c8991d28250 /media/cast
parent89a6f9606c5f474a1fc5deb08739d4de1734e948 (diff)
downloadchromium_src-1acec0ced6bf1beeb39639059f4820a4bff098e3.zip
chromium_src-1acec0ced6bf1beeb39639059f4820a4bff098e3.tar.gz
chromium_src-1acec0ced6bf1beeb39639059f4820a4bff098e3.tar.bz2
Cast: Fix cast sender app crashes.
- Add CommandLine::Init() to sender.cc - CastTransportSender should use cast_environment->Clock() instead of clock.get() as the latter is null after Pass() to cast_environment BUG= Review URL: https://codereview.chromium.org/192893006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cast')
-rw-r--r--media/cast/test/sender.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/media/cast/test/sender.cc b/media/cast/test/sender.cc
index 16ecb09..c6af48f 100644
--- a/media/cast/test/sender.cc
+++ b/media/cast/test/sender.cc
@@ -6,6 +6,7 @@
// or read from a file.
#include "base/at_exit.h"
+#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -411,6 +412,8 @@ void WriteLogsToFileAndStopSubscribing(
int main(int argc, char** argv) {
base::AtExitManager at_exit;
+ CommandLine::Init(argc, argv);
+ InitLogging(logging::LoggingSettings());
base::Thread test_thread("Cast sender test app thread");
base::Thread audio_thread("Cast audio encoder thread");
base::Thread video_thread("Cast video encoder thread");
@@ -418,7 +421,6 @@ int main(int argc, char** argv) {
audio_thread.Start();
video_thread.Start();
- scoped_ptr<base::TickClock> clock(new base::DefaultTickClock());
base::MessageLoopForIO io_message_loop;
int remote_port;
@@ -452,7 +454,7 @@ int main(int argc, char** argv) {
// Running transport on the main thread.
scoped_refptr<media::cast::CastEnvironment> cast_environment(
new media::cast::CastEnvironment(
- clock.Pass(),
+ make_scoped_ptr<base::TickClock>(new base::DefaultTickClock()),
io_message_loop.message_loop_proxy(),
audio_thread.message_loop_proxy(),
NULL,
@@ -464,7 +466,7 @@ int main(int argc, char** argv) {
scoped_ptr<media::cast::transport::CastTransportSender> transport_sender =
media::cast::transport::CastTransportSender::Create(
NULL, // net log.
- clock.get(),
+ cast_environment->Clock(),
local_endpoint,
remote_endpoint,
logging_config,