diff --git a/src/blackmagic_common.cpp b/src/blackmagic_common.cpp index 8c44cb911..3a1df6cc1 100644 --- a/src/blackmagic_common.cpp +++ b/src/blackmagic_common.cpp @@ -46,6 +46,7 @@ #include "blackmagic_common.h" #include "DeckLinkAPIVersion.h" #include +#include #include #define MOD_NAME "[DeckLink] " @@ -69,11 +70,13 @@ static unordered_map bmd_hresult_to_string_map = { string bmd_hresult_to_string(HRESULT res) { + ostringstream oss; auto it = bmd_hresult_to_string_map.find(res); if (it != bmd_hresult_to_string_map.end()) { - return it->second; + oss << it->second; } - return {}; + oss << " " << "(0x" << hex << setfill('0') << setw(8) << res << ")"; + return oss.str(); } /**