Floats not correctly impoirted during singlefile import
#1
Hi all,

I moved from a xbmc windows to a linux installation, because on my I3 DXVA2 has trouble playing most of my files(Artifacts).
I managed to get a stable working VAAPI installation, but after importing the VideoLibrary on linux from a single file, all aspectratios show up wrong.
So I looked into the DBs table streamdetail and the problem is that all
float values have been cut of after the decimalpoint during import.
Example fVideoAspect is 2.0 instead of 2.375.
My System Locale is de_DE.UTF8 do I have to change it to make the import work correctly, or is this a general Bug with Linux.

Thanks
Reply
#2
I fixed this by making the XMLUtils::GetFloat function Locale independent.

I replaced the line:
Code:
value = (float)atof(pNode->FirstChild()->Value());

with

Code:
value = 0.0f;
  std::istringstream istr(pNode->FirstChild()->Value());
  istr.imbue(std::locale("C"));
  istr >> value;
Reply
#3
Interesting, please file a bug ticket so we do not forget about it.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply

Logout Mark Read Team Forum Stats Members Help
Floats not correctly impoirted during singlefile import0