commit vapoursynth for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package vapoursynth for openSUSE:Factory checked in at 2023-10-31 20:25:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vapoursynth (Old) and /work/SRC/openSUSE:Factory/.vapoursynth.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "vapoursynth" Tue Oct 31 20:25:27 2023 rev:23 rq:1121327 version:65 Changes: -------- --- /work/SRC/openSUSE:Factory/vapoursynth/vapoursynth.changes 2023-10-13 23:16:46.515609028 +0200 +++ /work/SRC/openSUSE:Factory/.vapoursynth.new.17445/vapoursynth.changes 2023-10-31 20:25:43.662001615 +0100 @@ -1,0 +2,17 @@ +Mon Oct 30 21:31:59 UTC 2023 - Michael Vetter <mvetter@suse.com> + +- Update to 65: + * fixed inspection api sometimes causing memory corruption when + used from python + * frame properties in python are now return as str type instead + of bytes when hinted as utf8 printable + * fixed how unprintable data is returned from plugin functions + in python, previously it would leak a ctypes pointer + * with no length instead of returning a bytes object + * fixed a bug in the avx2 maskedmerge float premultiplied code + path that would switch the two input clips + * reverted the from_chars code a bit more to make no locale affect + float parsing + * fixed the sar adjustment for real this time + +------------------------------------------------------------------- Old: ---- vapoursynth-R64.tar.gz New: ---- vapoursynth-R65.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vapoursynth.spec ++++++ --- /var/tmp/diff_new_pack.kRXVs4/_old 2023-10-31 20:25:44.438030119 +0100 +++ /var/tmp/diff_new_pack.kRXVs4/_new 2023-10-31 20:25:44.438030119 +0100 @@ -17,7 +17,7 @@ Name: vapoursynth -Version: 64 +Version: 65 Release: 0 Summary: A video processing framework License: LGPL-2.1-only ++++++ vapoursynth-R64.tar.gz -> vapoursynth-R65.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/.github/workflows/linux.yml new/vapoursynth-R65/.github/workflows/linux.yml --- old/vapoursynth-R64/.github/workflows/linux.yml 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/.github/workflows/linux.yml 2023-10-29 14:57:45.000000000 +0100 @@ -7,8 +7,8 @@ runs-on: ubuntu-latest env: - CC: gcc-12 - CXX: g++-12 + CC: gcc-13 + CXX: g++-13 steps: - uses: actions/checkout@v3 @@ -18,7 +18,7 @@ - name: Install zimg run: | - git clone https://github.com/sekrit-twc/zimg --depth 1 --shallow-submodules --recurse-submodules + git clone https://bitbucket.org/the-sekrit-twc/zimg.git --depth 1 --recurse-submodules --shallow-submodules pushd zimg ./autogen.sh ./configure --prefix=/usr @@ -29,10 +29,9 @@ - uses: actions/setup-python@v4 with: - # Version range or exact version of a Python version to use, using SemVer's version range syntax. python-version: '3.11' - - name: Install/upgrade required Python packages + - name: Install Python packages run: | python -m pip install -U pip pip install -U cython setuptools wheel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/.github/workflows/macos.yml new/vapoursynth-R65/.github/workflows/macos.yml --- old/vapoursynth-R64/.github/workflows/macos.yml 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/.github/workflows/macos.yml 2023-10-29 14:57:45.000000000 +0100 @@ -4,43 +4,44 @@ jobs: build-clang: - runs-on: macos-latest + runs-on: macos-13 steps: - uses: actions/checkout@v3 - - name: Set CC and CXX to use Clang/LLVM 15 + - name: Install Homebrew packages run: | - echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV - echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV + brew update + brew install automake llvm + + - name: Set environment variables for Clang/LLVM + run: | + echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV + echo "CXX=/usr/local/opt/llvm/bin/clang++" >> $GITHUB_ENV + echo "LDFLAGS=-fuse-ld=lld -L/usr/local/opt/llvm/lib/c++ -Wl,-rpath,/usr/local/opt/llvm/lib/c++" >> $GITHUB_ENV + echo "PATH=/usr/local/opt/llvm/bin:$PATH" >> $GITHUB_ENV echo "CPATH=/usr/local/include:$CPATH" >> $GITHUB_ENV echo "LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH" >> $GITHUB_ENV - name: Print compiler version run: ${{ env.CC }} --version - - name: Install required packages - run: | - brew update - brew install automake - - name: Install zimg run: | - git clone https://github.com/sekrit-twc/zimg --depth 1 --shallow-submodules --recurse-submodules + git clone https://bitbucket.org/the-sekrit-twc/zimg.git --depth 1 --recurse-submodules --shallow-submodules pushd zimg ./autogen.sh ./configure - make -j3 - sudo make install -j3 + make -j4 + sudo make install -j4 popd rm -rf zimg - uses: actions/setup-python@v4 with: - # Version range or exact version of a Python version to use, using SemVer's version range syntax. python-version: '3.11' - - name: Install/upgrade required Python packages + - name: Install Python packages run: | python -m pip install -U pip pip install -U cython setuptools wheel @@ -51,11 +52,11 @@ ./configure - name: make - run: make -j3 + run: make -j4 - name: make install run: | - sudo make install -j3 + sudo make install -j4 pip install . - name: Run test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/.github/workflows/windows.yml new/vapoursynth-R65/.github/workflows/windows.yml --- old/vapoursynth-R64/.github/workflows/windows.yml 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/.github/workflows/windows.yml 2023-10-29 14:57:45.000000000 +0100 @@ -13,10 +13,10 @@ - name: Clone Dependencies run: | - git clone https://github.com/vapoursynth/vsrepo --depth 1 - git clone https://github.com/sekrit-twc/zimg --depth 1 --shallow-submodules --recurse-submodules git clone https://github.com/AviSynth/AviSynthPlus.git --depth 1 - git clone https://github.com/sekrit-twc/libp2p --depth 1 + git clone https://github.com/sekrit-twc/libp2p.git --depth 1 + git clone https://github.com/vapoursynth/vsrepo.git --depth 1 + git clone https://bitbucket.org/the-sekrit-twc/zimg.git --depth 1 --recurse-submodules --shallow-submodules - name: Setup Python 3.8 uses: actions/setup-python@v4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/ChangeLog new/vapoursynth-R65/ChangeLog --- old/vapoursynth-R64/ChangeLog 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/ChangeLog 2023-10-29 14:57:45.000000000 +0100 @@ -1,3 +1,11 @@ +r65: +fixed inspection api sometimes causing memory corruption when used from python +frame properties in python are now return as str type instead of bytes when hinted as utf8 printable +fixed how unprintable data is returned from plugin functions in python, previously it would leak a ctypes pointer with no length instead of returning a bytes object +fixed a bug in the avx2 maskedmerge float premultiplied code path that would switch the two input clips +reverted the from_chars code a bit more to make no locale affects float parsing +fixed the sar adjustment for real this time + r64: fixed compilation on osx where the default standard library doesn't have a full implementation of std::from_chars fixed SAR adjustment in resizer when source cropping is used diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/MANIFEST.in new/vapoursynth-R65/MANIFEST.in --- old/vapoursynth-R64/MANIFEST.in 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/MANIFEST.in 2023-10-29 14:57:45.000000000 +0100 @@ -1,4 +1,5 @@ include COPYING.LESSER +include VAPOURSYNTH_VERSION recursive-include test * recursive-include src/cython *.pyx *.pxd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/VAPOURSYNTH_VERSION new/vapoursynth-R65/VAPOURSYNTH_VERSION --- old/vapoursynth-R64/VAPOURSYNTH_VERSION 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/VAPOURSYNTH_VERSION 2023-10-29 14:57:45.000000000 +0100 @@ -1 +1 @@ -#define VS_CURRENT_RELEASE 64 \ No newline at end of file +#define VS_CURRENT_RELEASE 65 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/doc/functions/video/setframeprop.rst new/vapoursynth-R65/doc/functions/video/setframeprop.rst --- old/vapoursynth-R64/doc/functions/video/setframeprop.rst 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/doc/functions/video/setframeprop.rst 2023-10-29 14:57:45.000000000 +0100 @@ -12,9 +12,6 @@ The type of the property added depends on which of the *intval*, *floatval*, or *data* parameters is used. - The *data* parameter can only be used to add NULL-terminated strings, - not arbitrary binary data. - For example, to set the field order to top field first:: clip = c.std.SetFrameProp(clip, prop="_FieldBased", intval=2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/doc/pythonreference.rst new/vapoursynth-R65/doc/pythonreference.rst --- old/vapoursynth-R64/doc/pythonreference.rst 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/doc/pythonreference.rst 2023-10-29 14:57:45.000000000 +0100 @@ -39,7 +39,7 @@ +---------------------------------+---------------------------------------------------------------+--------------------------------------------------------+ | Operation | Description | Equivalent | +=================================+===============================================================+========================================================+ -| clip = clip[5] | Make a single frame clip containing frame number 5 | | +| clip = clip[5] | Make a single frame clip containing frame number 5 | clip = core.std.Trim(clip, first=5, last=5) | +---------------------------------+---------------------------------------------------------------+--------------------------------------------------------+ | clip = clip[5:11] | Make a clip containing frames 5 to 10 [#f1]_ | clip = core.std.Trim(clip, first=5, last=10) | | | | | @@ -74,6 +74,22 @@ Which is quivalent to:: clip = core.std.FlipVertical(core.std.Trim(clip, first=100, last=2000)) + +Function Arguments, Return Types and Property Type Deduction in Python +********************************************************************** + +VapourSynth internally uses a very simple map of key-value pairs to pass values to and from functions. +As a result of this every key is actually a one dimensional array of values of a single type. The Python bindings +try to hide this as best as possible to make things less annoying. For example a function returning only a single key +will have the only the array itself returned and an array with a single value will in turn only have the single value returned. + +Similarly function arguments are first converted to the appropriate type specified by the function's argument string or fails if this isn't possible. +There is however one quirk where the data type's type hint (utf-8/non-printable raw data) is set based on whether a *str* or a *bytes*/*bytearray* +object is passed. Likewise a *str* object will be returned for all utf-8 hinted data and a bytes object for all other types. + +Frame properties and "anything goes" function arguments have much stricter type requirements since the underlying type has to be possible to deduce from them. +When using this type of functions, such as SetFrameProps, or property assignment it may be necessary to convert to int, float, str or bytes explicitly +to make things works. Python Keywords as Filter Arguments *********************************** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/install_deps.bat new/vapoursynth-R65/install_deps.bat --- old/vapoursynth-R64/install_deps.bat 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/install_deps.bat 2023-10-29 14:57:45.000000000 +0100 @@ -19,18 +19,18 @@ ) IF NOT EXIST zimg ( - git clone https://github.com/sekrit-twc/zimg --shallow-submodules --recurse-submodules + git clone https://bitbucket.org/the-sekrit-twc/zimg.git --shallow-submodules --recurse-submodules ) ELSE ( echo zimg: & pushd zimg & git pull & popd ) py -3.11 -m ensurepip py -3.11 -m pip install --upgrade pip --no-warn-script-location -py -3.11 -m pip install -r python-requirements.txt +py -3.11 -m pip install --upgrade -r python-requirements.txt py -3.8 -m ensurepip py -3.8 -m pip install --upgrade pip --no-warn-script-location -py -3.8 -m pip install -r python-requirements.txt +py -3.8 -m pip install --upgrade -r python-requirements.txt SET ZFOLDER=%ProgramFiles%\7-Zip IF EXIST "%ZFOLDER%\7z.exe" GOTO copym diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/installer/make_portable.bat new/vapoursynth-R65/installer/make_portable.bat --- old/vapoursynth-R64/installer/make_portable.bat 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/installer/make_portable.bat 2023-10-29 14:57:45.000000000 +0100 @@ -9,7 +9,6 @@ mkdir buildp64\vapoursynth64\plugins mkdir buildp64\sdk\include mkdir buildp64\sdk\examples -mkdir buildp64\sdk\lib32 mkdir buildp64\sdk\lib64 mkdir buildp64\doc mkdir buildp64\vsgenstubs4 @@ -34,8 +33,6 @@ copy ..\include\VSHelper4.h buildp64\sdk\include copy ..\include\VSScript4.h buildp64\sdk\include copy ..\include\VSConstants4.h buildp64\sdk\include -copy ..\msvc_project\Release\vapoursynth.lib buildp64\sdk\lib32 -copy ..\msvc_project\Release\vsscript.lib buildp64\sdk\lib32 copy ..\msvc_project\x64\Release\vapoursynth.lib buildp64\sdk\lib64 copy ..\msvc_project\x64\Release\vsscript.lib buildp64\sdk\lib64 copy ..\sdk\filter_skeleton.c buildp64\sdk\examples diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/installer/vsinstaller.iss new/vapoursynth-R65/installer/vsinstaller.iss --- old/vapoursynth-R64/installer/vsinstaller.iss 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/installer/vsinstaller.iss 2023-10-29 14:57:45.000000000 +0100 @@ -109,9 +109,7 @@ Source: ..\include\VapourSynth.h; DestDir: {app}\sdk\include\vapoursynth; Flags: ignoreversion uninsrestartdelete restartreplace; Components: sdk Source: ..\include\VSHelper.h; DestDir: {app}\sdk\include\vapoursynth; Flags: ignoreversion uninsrestartdelete restartreplace; Components: sdk Source: ..\include\VSScript.h; DestDir: {app}\sdk\include\vapoursynth; Flags: ignoreversion uninsrestartdelete restartreplace; Components: sdk -Source: ..\msvc_project\Release\vsscript.lib; DestDir: {app}\sdk\lib32; Flags: ignoreversion uninsrestartdelete restartreplace; Components: sdk Source: ..\msvc_project\x64\Release\vsscript.lib; DestDir: {app}\sdk\lib64; Flags: ignoreversion uninsrestartdelete restartreplace; Components: sdk -Source: ..\msvc_project\Release\vapoursynth.lib; DestDir: {app}\sdk\lib32; Flags: ignoreversion uninsrestartdelete restartreplace; Components: sdk Source: ..\msvc_project\x64\Release\vapoursynth.lib; DestDir: {app}\sdk\lib64; Flags: ignoreversion uninsrestartdelete restartreplace; Components: sdk Source: ..\sdk\filter_skeleton.c; DestDir: {app}\sdk\examples; Flags: ignoreversion uninsrestartdelete restartreplace; Components: sdk Source: ..\sdk\invert_example.c; DestDir: {app}\sdk\examples; Flags: ignoreversion uninsrestartdelete restartreplace; Components: sdk diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/setup.py new/vapoursynth-R65/setup.py --- old/vapoursynth-R64/setup.py 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/setup.py 2023-10-29 14:57:45.000000000 +0100 @@ -11,7 +11,7 @@ is_win = (architecture()[1] == "WindowsPE") is_64 = (architecture()[0] == "64bit") -data_files = ['VAPOURSYNTH_VERSION'] +extra_data = {} library_dirs = [curdir, "build"] @@ -83,8 +83,8 @@ # Make sure the setup process copies the VapourSynth.dll into the site-package folder print("Found VapourSynth.dll at:", dll_path) - - data_files.extend([(r"Lib\site-packages", [dll_path])]) + + extra_data["data_files"] = [(r"Lib\site-packages", [dll_path])] setup( @@ -115,5 +115,6 @@ 'setuptools>=18.0', "Cython", ], - data_files=data_files + exclude_package_data={"": ("VAPOURSYNTH_VERSION",)}, + **extra_data ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/src/core/expr/expr.cpp new/vapoursynth-R65/src/core/expr/expr.cpp --- old/vapoursynth-R64/src/core/expr/expr.cpp 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/src/core/expr/expr.cpp 2023-10-29 14:57:45.000000000 +0100 @@ -22,6 +22,8 @@ #include <cassert> #include <charconv> #include <cmath> +#include <iostream> +#include <locale> #include <map> #include <memory> #include <set> @@ -202,14 +204,15 @@ throw std::runtime_error("illegal token: " + std::string{ token }); return{ token[0] == 'd' ? ExprOpType::DUP : ExprOpType::SWAP, idx }; } else { - char *str_end = const_cast<char *>(token.data()) + token.size(); - float f = strtof(token.data(), &str_end); - if (str_end == token.data()) - throw std::runtime_error("failed to convert '" + std::string{ token } + "' to float"); - if (str_end != token.data() + token.size()) - throw std::runtime_error("failed to convert '" + std::string{ token } + "' to float, not the whole token could be converted"); - if (f == HUGE_VALF) - throw std::runtime_error("failed to convert '" + std::string{ token } + "' to float, number out of range"); + float f; + std::string s; + std::string stoken(token); + std::istringstream numStream(stoken); + numStream.imbue(std::locale::classic()); + if (!(numStream >> f)) + throw std::runtime_error("failed to convert '" + stoken + "' to float"); + if (numStream >> s) + throw std::runtime_error("failed to convert '" + stoken + "' to float, not the whole token could be converted"); return{ ExprOpType::CONSTANT, f }; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/src/core/kernel/x86/merge_avx2.c new/vapoursynth-R65/src/core/kernel/x86/merge_avx2.c --- old/vapoursynth-R64/src/core/kernel/x86/merge_avx2.c 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/src/core/kernel/x86/merge_avx2.c 2023-10-29 14:57:45.000000000 +0100 @@ -316,7 +316,7 @@ __m256 v1 = _mm256_load_ps(srcp1 + i); __m256 v2 = _mm256_load_ps(srcp2 + i); __m256 w1 = _mm256_sub_ps(_mm256_set1_ps(1.0f), _mm256_load_ps(maskp + i)); - __m256 result = _mm256_fmadd_ps(v2, w1, v1); + __m256 result = _mm256_fmadd_ps(v1, w1, v2); _mm256_store_ps(dstp + i, result); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/src/core/vsresize.cpp new/vapoursynth-R65/src/core/vsresize.cpp --- old/vapoursynth-R64/src/core/vsresize.cpp 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/src/core/vsresize.cpp 2023-10-29 14:57:45.000000000 +0100 @@ -336,7 +336,7 @@ muldivRational(&sar_num, &sar_den, src_format.width, dst_format.width); if (!std::isnan(src_format.active_region.height) && src_format.active_region.height != src_format.height) - muldivRational(&sar_num, &sar_den, std::llround(src_format.active_region.height * 16), static_cast<int64_t>(dst_format.height) * 16); + muldivRational(&sar_num, &sar_den, static_cast<int64_t>(dst_format.height) * 16, std::llround(src_format.active_region.height * 16)); else muldivRational(&sar_num, &sar_den, dst_format.height, src_format.height); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/src/core/vsthreadpool.cpp new/vapoursynth-R65/src/core/vsthreadpool.cpp --- old/vapoursynth-R64/src/core/vsthreadpool.cpp 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/src/core/vsthreadpool.cpp 2023-10-29 14:57:45.000000000 +0100 @@ -109,7 +109,8 @@ } } - PVSFrameContext mainContextRef = std::move(*iter); + // this is needed in order to prevent more tasks latching on to a context in the final stages of completion, holds a reference to frameContext + PVSFrameContext mainContextRef = std::move(*iter); tasks.erase(iter); allContexts.erase(frameContext->key); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/src/cython/vapoursynth.pxd new/vapoursynth-R65/src/cython/vapoursynth.pxd --- old/vapoursynth-R64/src/cython/vapoursynth.pxd 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/src/cython/vapoursynth.pxd 2023-10-29 14:57:45.000000000 +0100 @@ -318,7 +318,7 @@ VSFunction *addFunctionRef(VSFunction *f) nogil void callFunction(VSFunction *func, const VSMap *inm, VSMap *outm) nogil - # Map and proptery access + # Map and property access VSMap *createMap() nogil void freeMap(VSMap *map) nogil void clearMap(VSMap *map) nogil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/src/cython/vapoursynth.pyx new/vapoursynth-R65/src/cython/vapoursynth.pyx --- old/vapoursynth-R64/src/cython/vapoursynth.pyx 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/src/cython/vapoursynth.pyx 2023-10-29 14:57:45.000000000 +0100 @@ -815,7 +815,7 @@ elif proptype == ptFloat: newval = funcs.mapGetFloat(map, retkey, y, NULL) elif proptype == ptData: - newval = funcs.mapGetData(map, retkey, y, NULL) + newval = funcs.mapGetData(map, retkey, y, NULL)[:funcs.mapGetDataSize(map, retkey, y, NULL)] if funcs.mapGetDataTypeHint(map, retkey, y, NULL) == dtUtf8: newval = newval.decode('utf-8') elif proptype == ptVideoNode or proptype == ptAudioNode: @@ -1071,7 +1071,10 @@ elif t == ptData: for i in range(numelem): data = self.funcs.mapGetData(m, b, i, NULL) - ol.append(data[:self.funcs.mapGetDataSize(m, b, i, NULL)]) + aval = data[:self.funcs.mapGetDataSize(m, b, i, NULL)] + if self.funcs.mapGetDataTypeHint(m, b, i, NULL) == dtUtf8: + aval = aval.decode('utf-8') + ol.append(aval) elif t == ptVideoNode or t == ptAudioNode: for i in range(numelem): ol.append(createNode(self.funcs.mapGetNode(m, b, i, NULL), self.funcs, _get_core())) @@ -1511,7 +1514,7 @@ cdef class _frame: @staticmethod - cdef void* getdata(VSFrame* frame, int index, unsigned* flags, const VSAPI* lib) nogil: + cdef void* getdata(VSFrame* frame, int index, unsigned* flags, const VSAPI* lib) noexcept nogil: cdef: unsigned mask @@ -1967,7 +1970,7 @@ raise Error("This node is not inspectable") return tuple( - createNode(self.funcs.getNodeDependencies(self.node)[idx].source, self.funcs, self.core) + createNode(self.funcs.addNodeRef(self.funcs.getNodeDependencies(self.node)[idx].source), self.funcs, self.core) for idx in range(self.funcs.getNumNodeDependencies(self.node)) ) @@ -3236,7 +3239,7 @@ se.errstr = <void *>errstr return 1 -cdef public api void vpy4_freeScript(VSScript *se) nogil: +cdef public api void vpy4_freeScript(VSScript *se) noexcept nogil: with gil: vpy_clearEnvironment(se) if se.pyenvdict: @@ -3370,7 +3373,7 @@ return 1 return 0 -cdef public api void vpy_clearEnvironment(VSScript *se) nogil: +cdef public api void vpy_clearEnvironment(VSScript *se) noexcept nogil: with gil: pyenvdict = <dict>se.pyenvdict for key in pyenvdict: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/src/vspipe/vspipe.cpp new/vapoursynth-R65/src/vspipe/vspipe.cpp --- old/vapoursynth-R64/src/vspipe/vspipe.cpp 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/src/vspipe/vspipe.cpp 2023-10-29 14:57:45.000000000 +0100 @@ -735,7 +735,7 @@ } arg++; - } else if (argString == NSTRING("-y") || argString == NSTRING("--y4m")) { // secret option for comaptibility with V3 + } else if (argString == NSTRING("-y") || argString == NSTRING("--y4m")) { // secret option for compatibility with V3 fprintf(stderr, "Deprecated option --y4m specified, use -c y4m instead\n"); opts.outputHeaders = VSPipeHeaders::Y4M; } else if (argString == NSTRING("-p") || argString == NSTRING("--progress")) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vapoursynth-R64/test/prop_dict_test.py new/vapoursynth-R65/test/prop_dict_test.py --- old/vapoursynth-R64/test/prop_dict_test.py 2023-09-27 06:16:13.000000000 +0200 +++ new/vapoursynth-R65/test/prop_dict_test.py 2023-10-29 14:57:45.000000000 +0100 @@ -80,7 +80,7 @@ self.assertEqual(self.props_rw.setdefault("_NonExistent1"), 0) self.assertEqual(self.props_rw["_NonExistent1"], 0) - self.assertEqual(self.props_rw.setdefault("_NonExistent2", "Testificate"), b"Testificate") + self.assertEqual(self.props_rw.setdefault("_NonExistent2", b"Testificate"), b"Testificate") self.assertEqual(self.props_rw["_NonExistent2"], b"Testificate") def test_attr_access(self): @@ -101,6 +101,12 @@ self.assertEqual(self.props_rw._DurationDen, 1) del self.props_rw._DurationDen self.assertFalse(hasattr(self.props_rw, '_DurationDen')) + + def test_data_props(self): + self.props_rw.DataPropStr = 'hello' + self.props_rw.DataPropBytes = b'hello' + self.assertEqual(type(self.props_rw.DataPropStr), str) + self.assertEqual(type(self.props_rw.DataPropBytes), bytes) if __name__ == '__main__':
participants (1)
-
Source-Sync