mirror of
https://github.com/opencv/opencv.git
synced 2025-07-31 01:47:12 +08:00
Merge pull request #10260 from native-api:ffmpeg_load_from_package
This commit is contained in:
commit
66e09bc9a4
@ -124,8 +124,10 @@ private:
|
||||
if (m)
|
||||
{
|
||||
wchar_t path[MAX_PATH];
|
||||
size_t sz = GetModuleFileNameW(m, path, sizeof(path));
|
||||
if (sz > 0 && ERROR_SUCCESS == GetLastError())
|
||||
const size_t path_size = sizeof(path)/sizeof(*path);
|
||||
size_t sz = GetModuleFileNameW(m, path, path_size);
|
||||
/* Don't handle paths longer than MAX_PATH until that becomes a real issue */
|
||||
if (sz > 0 && sz < path_size)
|
||||
{
|
||||
wchar_t* s = wcsrchr(path, L'\\');
|
||||
if (s)
|
||||
|
Loading…
Reference in New Issue
Block a user