fixed gemini2 cannot convert mjpeg

This commit is contained in:
Joe Dong
2023-05-08 16:28:55 +08:00
parent 7c4f7ae3ff
commit db3f5d89f8
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -164,7 +164,11 @@ OBFormat OBFormatFromString(const std::string &format) {
std::string fixed_format;
std::transform(format.begin(), format.end(), std::back_inserter(fixed_format),
[](const auto ch) { return std::isalpha(ch) ? toupper(ch) : ch; });
if (fixed_format == "YUYV") {
if (fixed_format == "MJPG") {
return OB_FORMAT_MJPG;
} else if (fixed_format == "MJPEG") {
return OB_FORMAT_MJPEG;
} else if (fixed_format == "YUYV") {
return OB_FORMAT_YUYV;
} else if (fixed_format == "YUYV2") {
return OB_FORMAT_YUY2;