Index: media/test/pipeline_integration_test_base.cc |
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc |
index 17647ba7ad07dd725c6998ae55f1864f348b398b..9c20aebbf14e788d6e3d38aea9ce8f169af0df7f 100644 |
--- a/media/test/pipeline_integration_test_base.cc |
+++ b/media/test/pipeline_integration_test_base.cc |
@@ -83,6 +83,15 @@ void PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB( |
void PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB( |
scoped_ptr<MediaTracks> tracks) { |
CHECK(tracks); |
+ CHECK(demuxer_); |
+ |
+ // Generate track ids. |
+ std::vector<unsigned> track_ids; |
+ for (size_t track_id = 1; track_id <= tracks->tracks().size(); ++track_id) { |
+ track_ids.push_back(track_id); |
+ } |
+ |
+ demuxer_->OnTrackIdsAssigned(*tracks.get(), track_ids); |
} |
void PipelineIntegrationTestBase::OnEnded() { |
@@ -273,16 +282,14 @@ void PipelineIntegrationTestBase::CreateDemuxer( |
scoped_ptr<DataSource> data_source) { |
data_source_ = std::move(data_source); |
- Demuxer::MediaTracksUpdatedCB tracks_updated_cb = |
- base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB, |
- base::Unretained(this)); |
- |
#if !defined(MEDIA_DISABLE_FFMPEG) |
demuxer_ = scoped_ptr<Demuxer>(new FFmpegDemuxer( |
message_loop_.task_runner(), data_source_.get(), |
base::Bind(&PipelineIntegrationTestBase::DemuxerEncryptedMediaInitDataCB, |
base::Unretained(this)), |
- tracks_updated_cb, new MediaLog())); |
+ base::Bind(&PipelineIntegrationTestBase::DemuxerMediaTracksUpdatedCB, |
+ base::Unretained(this)), |
+ new MediaLog())); |
#endif |
} |