diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-24 21:35:36 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-24 21:35:36 +0000 |
commit | 1d8155427b2f30c16b3b948f143c058551eebc8e (patch) | |
tree | fa07b7e0ce8763eb93e03ca8f5a8562525916e47 /media/cast/test | |
parent | b33c2b6429f24a54da167363576b4a51636f7c9d (diff) | |
download | chromium_src-1d8155427b2f30c16b3b948f143c058551eebc8e.zip chromium_src-1d8155427b2f30c16b3b948f143c058551eebc8e.tar.gz chromium_src-1d8155427b2f30c16b3b948f143c058551eebc8e.tar.bz2 |
Cast: Fix threading issues in VideoEncoderImpl
VideoEncoderImpl can be used after delete. We assumed that main thread
out-live video encoder thread. This is not true for some use cases. For
example in the renderer when video encoder thread is shared by multiple
instances of CastSEnder. To fix this we need to separate Vp8Encoder and
VideoEncoderImpl.
VideoEncoderImpl will live on the main thread only. And Vp8Encoder will
live on the video encoder thread only.
Tested this change with vagrind and cast_unittests reports no error.
TBR=mikhal@chromium.org
BUG=336887
Review URL: https://codereview.chromium.org/138953009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cast/test')
-rw-r--r-- | media/cast/test/end2end_unittest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/cast/test/end2end_unittest.cc b/media/cast/test/end2end_unittest.cc index 88b6e34..80f504c 100644 --- a/media/cast/test/end2end_unittest.cc +++ b/media/cast/test/end2end_unittest.cc @@ -458,6 +458,12 @@ class End2EndTest : public ::testing::Test { virtual ~End2EndTest() {} + virtual void TearDown() OVERRIDE { + cast_sender_.reset(); + cast_receiver_.reset(); + task_runner_->RunTasks(); + } + void SendVideoFrame(int start_value, const base::TimeTicks& capture_time) { if (start_time_.is_null()) start_time_ = testing_clock_->NowTicks(); |