Skip to content

Commit

Permalink
言語による--audio-copyの指定が適切に動作していなかった問題を修正。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Jan 25, 2023
1 parent 4341e31 commit fd1eb33
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions VCECore/rgy_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3710,15 +3710,17 @@ int parse_one_common_option(const TCHAR *option_name, const TCHAR *strInput[], i
auto trackListStr = split(strInput[i], _T(","));
for (auto str : trackListStr) {
int iTrack = 0;
if (1 == _stscanf(str.c_str(), _T("%d"), &iTrack) || iTrack < 1) {
trackSet.insert(std::make_pair(iTrack, ""));
} else if (rgy_lang_exist(tchar_to_string(str))) {
trackSet.insert(std::make_pair(TRACK_SELECT_BY_LANG, tchar_to_string(str)));
} else if (avcodec_exists(tchar_to_string(str), AVMEDIA_TYPE_AUDIO)) {
trackSet.insert(std::make_pair(TRACK_SELECT_BY_CODEC, tchar_to_string(str)));
if (1 != _stscanf(str.c_str(), _T("%d"), &iTrack) || iTrack < 1) {
if (rgy_lang_exist(tchar_to_string(str))) {
trackSet.insert(std::make_pair(TRACK_SELECT_BY_LANG, tchar_to_string(str)));
} else if (avcodec_exists(tchar_to_string(str), AVMEDIA_TYPE_AUDIO)) {
trackSet.insert(std::make_pair(TRACK_SELECT_BY_CODEC, tchar_to_string(str)));
} else {
print_cmd_error_invalid_value(option_name, strInput[i]);
return 1;
}
} else {
print_cmd_error_invalid_value(option_name, strInput[i]);
return 1;
trackSet.insert(std::make_pair(iTrack, ""));
}
}
} else {
Expand Down

0 comments on commit fd1eb33

Please sign in to comment.