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

Unified Diff: media/formats/common/stream_parser_test_base.cc

Issue 2239013002: Assign correct track ids to buffers emitted from StreamParsers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/formats/common/stream_parser_test_base.h ('k') | media/formats/mp2t/es_parser_adts.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/common/stream_parser_test_base.cc
diff --git a/media/formats/common/stream_parser_test_base.cc b/media/formats/common/stream_parser_test_base.cc
index 86c9499f2ec6af054a9259aec84c8d1d574575be..2af18a4c70fb1578ccaa322c8adede7944148ca2 100644
--- a/media/formats/common/stream_parser_test_base.cc
+++ b/media/formats/common/stream_parser_test_base.cc
@@ -93,6 +93,7 @@ bool StreamParserTestBase::OnNewConfig(
EXPECT_EQ(tracks->tracks().size(), 1u);
const auto& track = tracks->tracks()[0];
EXPECT_EQ(track->type(), MediaTrack::Audio);
+ audio_track_id_ = track->bytestream_track_id();
last_audio_config_ = tracks->getAudioConfig(track->bytestream_track_id());
EXPECT_TRUE(last_audio_config_.IsValidConfig());
return true;
@@ -105,6 +106,11 @@ bool StreamParserTestBase::OnNewBuffers(
EXPECT_FALSE(audio_buffers.empty());
EXPECT_TRUE(video_buffers.empty());
+ // Ensure that track ids are properly assigned on all emitted buffers.
+ for (const auto& buf : audio_buffers) {
+ EXPECT_EQ(audio_track_id_, buf->track_id());
+ }
+
// TODO(wolenetz/acolwell): Add text track support to more MSE parsers. See
// http://crbug.com/336926.
EXPECT_TRUE(text_map.empty());
« no previous file with comments | « media/formats/common/stream_parser_test_base.h ('k') | media/formats/mp2t/es_parser_adts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698