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

Side by Side Diff: media/filters/pipeline_integration_test.cc

Issue 256583006: Fix possible buffer emission during an abort. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address CR comments. Created 6 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/pipeline_integration_test_base.h" 5 #include "media/filters/pipeline_integration_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 315
316 scoped_ptr<Demuxer> GetDemuxer() { return owned_chunk_demuxer_.Pass(); } 316 scoped_ptr<Demuxer> GetDemuxer() { return owned_chunk_demuxer_.Pass(); }
317 317
318 void set_need_key_cb(const Demuxer::NeedKeyCB& need_key_cb) { 318 void set_need_key_cb(const Demuxer::NeedKeyCB& need_key_cb) {
319 need_key_cb_ = need_key_cb; 319 need_key_cb_ = need_key_cb;
320 } 320 }
321 321
322 void Seek(base::TimeDelta seek_time, int new_position, int seek_append_size) { 322 void Seek(base::TimeDelta seek_time, int new_position, int seek_append_size) {
323 chunk_demuxer_->StartWaitingForSeek(seek_time); 323 chunk_demuxer_->StartWaitingForSeek(seek_time);
324 324
325 chunk_demuxer_->Abort(kSourceId); 325 base::TimeDelta timestamp_offset;
326 chunk_demuxer_->Abort(
wolenetz 2014/05/06 00:04:32 nit: add similar TODO(wolenetz): referencing http:
damienv1 2014/05/06 00:29:00 Why ? Doesn't seem to be the same issue. Are you r
wolenetz 2014/05/06 00:32:05 You're right. Use 249422 please.
327 kSourceId,
328 base::TimeDelta(), kInfiniteDuration(), &last_timestamp_offset_);
326 329
327 DCHECK_GE(new_position, 0); 330 DCHECK_GE(new_position, 0);
328 DCHECK_LT(new_position, file_data_->data_size()); 331 DCHECK_LT(new_position, file_data_->data_size());
329 current_position_ = new_position; 332 current_position_ = new_position;
330 333
331 AppendData(seek_append_size); 334 AppendData(seek_append_size);
332 } 335 }
333 336
334 void AppendData(int size) { 337 void AppendData(int size) {
335 DCHECK(chunk_demuxer_); 338 DCHECK(chunk_demuxer_);
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 Play(); 1277 Play();
1275 ASSERT_TRUE(WaitUntilOnEnded()); 1278 ASSERT_TRUE(WaitUntilOnEnded());
1276 } 1279 }
1277 1280
1278 // TODO(wolenetz): Enable MSE testing of new frame processor based on this flag, 1281 // TODO(wolenetz): Enable MSE testing of new frame processor based on this flag,
1279 // once the new processor has landed. See http://crbug.com/249422. 1282 // once the new processor has landed. See http://crbug.com/249422.
1280 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, PipelineIntegrationTest, 1283 INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, PipelineIntegrationTest,
1281 Values(true)); 1284 Values(true));
1282 1285
1283 } // namespace media 1286 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698