| 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();
|
|
|