Created
August 27, 2021 09:29
-
-
Save tana3n/8866823130cd839c9fe12efe1bc6f9cb to your computer and use it in GitHub Desktop.
My Patch for https://github.com/msg7086/x265-Yuuki-Asuna
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/source/input/avs.cpp b/source/input/avs.cpp | |
index c84dd9b9b..3db615f56 100644 | |
--- a/source/input/avs.cpp | |
+++ b/source/input/avs.cpp | |
@@ -77,6 +77,11 @@ void AVSInput::info_avs() | |
void AVSInput::openfile(InputFileInfo& info) | |
{ | |
+ //thx http://csbarn.blogspot.com/2013/07/multibytetowidechartomultibyte_8.html | |
+ wchar_t real_filename_wchar[MAX_PATH * 4]; | |
+ MultiByteToWideChar(CP_UTF8, 0, real_filename, -1, real_filename_wchar, 1024); | |
+ WideCharToMultiByte(CP_THREAD_ACP, 0, real_filename_wchar, -1, real_filename, 1024, NULL, NULL); | |
+ general_log(NULL, "avs+", X265_LOG_INFO, "Input file: %s\n",real_filename); | |
AVS_Value res = h->func.avs_invoke(h->env, "Import", avs_new_value_string(real_filename), NULL); | |
FAIL_IF_ERROR(avs_is_error(res), "Error loading file: %s\n", avs_as_string(res)); | |
FAIL_IF_ERROR(!avs_is_clip(res), "File didn't return a video clip\n"); | |
diff --git a/source/output/mp4.cpp b/source/output/mp4.cpp | |
index f89898ab3..60f95f902 100644 | |
--- a/source/output/mp4.cpp | |
+++ b/source/output/mp4.cpp | |
@@ -133,7 +133,7 @@ void MP4Output::closeFile(int64_t largest_pts, int64_t second_largest_pts) | |
int MP4Output::openFile(const char *psz_filename) | |
{ | |
- FILE *fh = fopen(psz_filename, "wb"); | |
+ FILE *fh = x265_fopen(psz_filename, "wb"); | |
MP4_FAIL_IF_ERR(!fh, "cannot open output file `%s'.\n", psz_filename); | |
fclose(fh); | |
diff --git a/source/x265res.manifest.in b/source/x265res.manifest.in | |
index 2ae61a00e..e0b26545c 100644 | |
--- a/source/x265res.manifest.in | |
+++ b/source/x265res.manifest.in | |
@@ -1,10 +1,10 @@ | |
-<?xml version="1.0" encoding="utf-8" standalone="yes"?> | |
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | |
- <assemblyIdentity type="win32" name="MCW.x265-aMod" version="@X265_VERSION_MAJOR@.@X265_VERSION_MINOR@.@X265_BRANCH_ID@.@X265_TAG_DISTANCE@"/> | |
- <application xmlns="urn:schemas-microsoft-com:asm.v3"> | |
- <windowsSettings> | |
- <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> | |
- <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage> | |
- </windowsSettings> | |
- </application> | |
-</assembly> | |
+<?xml version="1.0" encoding="utf-8" standalone="yes"?> | |
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | |
+ <assemblyIdentity type="win32" name="MCW.x265-aMod" version="@X265_VERSION_MAJOR@.@X265_VERSION_MINOR@.@X265_BRANCH_ID@.@X265_TAG_DISTANCE@"/> | |
+ <application xmlns="urn:schemas-microsoft-com:asm.v3"> | |
+ <windowsSettings> | |
+ <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> | |
+ <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">Shift-JIS</activeCodePage> | |
+ </windowsSettings> | |
+ </application> | |
+</assembly> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment