Skip to content

Commit 5e7b029

Browse files
committed
fix unflattenExtraOptions arg type
1 parent 6f199e8 commit 5e7b029

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/torchcodec/_core/custom_ops.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ std::string quoteValue(const std::string& value) {
161161

162162
// Helper function to unflatten extra_options, alternating keys and values
163163
std::map<std::string, std::string> unflattenExtraOptions(
164-
const std::vector<std::string>& opts) {
164+
const std::vector<std::string_view>& opts) {
165165
std::map<std::string, std::string> optionsMap;
166166
for (size_t i = 0; i < opts.size(); i += 2) {
167-
optionsMap[opts[i]] = opts[i + 1];
167+
optionsMap[opts[i].data()] = opts[i + 1].data();
168168
}
169169
return optionsMap;
170170
}

0 commit comments

Comments
 (0)