videoio: Include missing locale header for std::wstring_convert

This fixes the following error with mingw toolchain:
opencv/modules/videoio/src/cap_msmf.cpp:1020: error: 'wstring_convert' is not a member of 'std'
 1020 |                                     std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> conv;
      |                                          ^~~~~~~~~~~~~~~
opencv/modules/videoio/src/cap_ffmpeg_hw.hpp:230:26: error: 'wstring_convert' is not a member of 'std'
  230 |                     std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> conv;
      |                          ^~~~~~~~~~~~~~~

The locale header is required according to C++ standard.
See https://en.cppreference.com/w/cpp/locale/wstring_convert
pull/22403/head
Biswapriyo Nath 2 years ago
parent 7deb8f568f
commit 984e42b0bc
  1. 1
      modules/videoio/src/cap_ffmpeg_hw.hpp
  2. 1
      modules/videoio/src/cap_msmf.cpp

@ -21,6 +21,7 @@
#define D3D11_NO_HELPERS
#include <d3d11.h>
#include <codecvt>
#include <locale>
#include "opencv2/core/directx.hpp"
#ifdef HAVE_OPENCL
#include <CL/cl_d3d11.h>

@ -29,6 +29,7 @@
#ifdef HAVE_MSMF_DXVA
#include <d3d11.h>
#include <d3d11_4.h>
#include <locale>
#endif
#include <new>
#include <map>

Loading…
Cancel
Save