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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 321233004: MSE: Remap single text track number changes in frame processor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes a couple nits Created 6 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 | « no previous file | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 3341fcc86bc53bd80d9500c1dca93a32cc807a42..f23e5340616b8a8339434b431a50dd64cad5bcdc 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -623,8 +623,17 @@ bool SourceState::OnNewConfigs(
success &= false;
MEDIA_LOG(log_cb_) << "New text track config does not match old one.";
} else {
- text_stream_map_.clear();
- text_stream_map_[config_itr->first] = text_stream;
+ StreamParser::TrackId old_id = stream_itr->first;
+ StreamParser::TrackId new_id = config_itr->first;
+ if (new_id != old_id) {
+ if (frame_processor_->UpdateTrack(old_id, new_id)) {
+ text_stream_map_.clear();
+ text_stream_map_[config_itr->first] = text_stream;
+ } else {
+ success &= false;
+ MEDIA_LOG(log_cb_) << "Error remapping single text track number";
+ }
+ }
}
} else {
for (TextConfigItr config_itr = text_configs.begin();
« no previous file with comments | « no previous file | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698