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

Unified Diff: media/filters/chunk_demuxer_unittest.cc

Issue 2050043002: Generate and assign media track ids in demuxers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-streamparser-trackid
Patch Set: rebase to ToT Created 4 years, 6 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 | « media/filters/chunk_demuxer.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer_unittest.cc
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc
index df13d2b2fa314047c9842385b856caa1f0a0c246..56f2c7ca78312beb0dd66ce370fdf83f5e4dc411 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -1405,6 +1405,13 @@ class ChunkDemuxerTest : public ::testing::Test {
DCHECK(tracks.get());
DCHECK_GT(tracks->tracks().size(), 0u);
+ // Verify that track ids are unique.
+ std::set<MediaTrack::Id> track_ids;
+ for (const auto& track : tracks->tracks()) {
+ EXPECT_EQ(track_ids.end(), track_ids.find(track->id()));
+ track_ids.insert(track->id());
+ }
+
InitSegmentReceivedMock(tracks);
}
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698