Project import generated by Copybara.
GitOrigin-RevId: 6f964e58d874e47fb6207aa97d060a4cd6428527
This commit is contained in:
@@ -76,10 +76,11 @@ namespace tool {
|
||||
::mediapipe::Status RemoveIgnoredStreams(
|
||||
proto_ns::RepeatedPtrField<ProtoString>* streams,
|
||||
const std::set<std::string>& missing_streams) {
|
||||
ASSIGN_OR_RETURN(auto src_map, tool::TagMap::Create(*streams));
|
||||
std::vector<std::string> src_names = src_map->Names();
|
||||
for (int i = streams->size() - 1; i >= 0; --i) {
|
||||
if (missing_streams.count(src_names[i]) > 0) {
|
||||
std::string tag, name;
|
||||
int index;
|
||||
MP_RETURN_IF_ERROR(ParseTagIndexName(streams->Get(i), &tag, &index, &name));
|
||||
if (missing_streams.count(name) > 0) {
|
||||
streams->DeleteSubrange(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user