You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Merge commit 'cf53704c55378cc0dcfc16637cdac7d58f0b3107'
* commit 'cf53704c55378cc0dcfc16637cdac7d58f0b3107': AVOptions: make av_set_options_string() forward options to child objects win32: Use 64-bit fstat/lseek variants for MSVC as well win32: Make ff_win32_open more robust Conflicts: libavformat/os_support.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <share.h>
|
#include <share.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
int ff_win32_open(const char *filename_utf8, int oflag, int pmode)
|
int ff_win32_open(const char *filename_utf8, int oflag, int pmode)
|
||||||
{
|
{
|
||||||
@@ -48,8 +49,10 @@ int ff_win32_open(const char *filename_utf8, int oflag, int pmode)
|
|||||||
if (num_chars <= 0)
|
if (num_chars <= 0)
|
||||||
goto fallback;
|
goto fallback;
|
||||||
filename_w = av_mallocz(sizeof(wchar_t) * num_chars);
|
filename_w = av_mallocz(sizeof(wchar_t) * num_chars);
|
||||||
if (!filename_w)
|
if (!filename_w) {
|
||||||
|
errno = ENOMEM;
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
MultiByteToWideChar(CP_UTF8, 0, filename_utf8, -1, filename_w, num_chars);
|
MultiByteToWideChar(CP_UTF8, 0, filename_utf8, -1, filename_w, num_chars);
|
||||||
|
|
||||||
fd = _wsopen(filename_w, oflag, SH_DENYNO, pmode);
|
fd = _wsopen(filename_w, oflag, SH_DENYNO, pmode);
|
||||||
@@ -59,7 +62,7 @@ int ff_win32_open(const char *filename_utf8, int oflag, int pmode)
|
|||||||
return fd;
|
return fd;
|
||||||
|
|
||||||
fallback:
|
fallback:
|
||||||
/* filename maybe be in CP_ACP */
|
/* filename may be be in CP_ACP */
|
||||||
return _sopen(filename_utf8, oflag, SH_DENYNO, pmode);
|
return _sopen(filename_utf8, oflag, SH_DENYNO, pmode);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1040,7 +1040,7 @@ static int parse_key_value_pair(void *ctx, const char **buf,
|
|||||||
|
|
||||||
av_log(ctx, AV_LOG_DEBUG, "Setting entry with key '%s' to value '%s'\n", key, val);
|
av_log(ctx, AV_LOG_DEBUG, "Setting entry with key '%s' to value '%s'\n", key, val);
|
||||||
|
|
||||||
ret = av_opt_set(ctx, key, val, 0);
|
ret = av_opt_set(ctx, key, val, AV_OPT_SEARCH_CHILDREN);
|
||||||
if (ret == AVERROR_OPTION_NOT_FOUND)
|
if (ret == AVERROR_OPTION_NOT_FOUND)
|
||||||
av_log(ctx, AV_LOG_ERROR, "Key '%s' not found.\n", key);
|
av_log(ctx, AV_LOG_ERROR, "Key '%s' not found.\n", key);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user