From 45db8614ab7a2c92e1ed3c4caae5c99759f90590 Mon Sep 17 00:00:00 2001 From: Street Pea Date: Mon, 13 May 2024 19:05:13 -0700 Subject: [PATCH] Revert to version 6.1 of ffmpeg for Linux since vulkan headers aren't new enough in Flatpak and Appimage and fix sockerr on Windows for stoppipe --- lib/src/stoppipe.c | 7 +++++-- scripts/build-ffmpeg-windows.sh | 2 +- scripts/build-ffmpeg.sh | 2 +- scripts/flatpak/chiaki4deck-devel.yaml | 4 ++-- scripts/flatpak/chiaki4deck.yaml | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/src/stoppipe.c b/lib/src/stoppipe.c index 3209f491c..aff469d32 100644 --- a/lib/src/stoppipe.c +++ b/lib/src/stoppipe.c @@ -207,13 +207,16 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_stop_pipe_connect(ChiakiStopPipe *stop_pipe return CHIAKI_ERR_UNKNOWN; #ifdef _WIN32 - DWORD sockerr; + int sockerr; + socklen_t sockerr_sz = sizeof(sockerr); + if(getsockopt(fd, SOL_SOCKET, SO_ERROR, (char*)(&sockerr), &sockerr_sz) < 0) + return CHIAKI_ERR_UNKNOWN; #else int sockerr; -#endif socklen_t sockerr_sz = sizeof(sockerr); if(getsockopt(fd, SOL_SOCKET, SO_ERROR, &sockerr, &sockerr_sz) < 0) return CHIAKI_ERR_UNKNOWN; +#endif #ifdef _WIN32 switch(sockerr) diff --git a/scripts/build-ffmpeg-windows.sh b/scripts/build-ffmpeg-windows.sh index d331bfd01..9d8f39a51 100644 --- a/scripts/build-ffmpeg-windows.sh +++ b/scripts/build-ffmpeg-windows.sh @@ -10,6 +10,6 @@ TAG=n7.0 git clone https://git.ffmpeg.org/ffmpeg.git --depth 1 -b $TAG && cd ffmpeg || exit 1 git apply ${SCRIPT_DIR}/flatpak/0001-vulkan-ignore-frames-without-hw-context.patch || exit 1 -./configure --disable-all --enable-shared --enable-avformat --enable-avcodec --enable-decoder=h264 --enable-decoder=hevc --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=h264_d3d11va --enable-hwaccel=hevc_d3d11va --prefix=/mingw64 "$@" || exit 1 +./configure --disable-all --enable-shared --enable-ffmpeg --enable-avformat --enable-avcodec --enable-decoder=h264 --enable-decoder=hevc --enable-hwaccel=h264_vulkan --enable-hwaccel=hevc_vulkan --enable-hwaccel=h264_d3d11va --enable-hwaccel=hevc_d3d11va --prefix=/mingw64 "$@" || exit 1 make -j4 || exit 1 make install || exit 1 \ No newline at end of file diff --git a/scripts/build-ffmpeg.sh b/scripts/build-ffmpeg.sh index 27b780ef9..206e05802 100755 --- a/scripts/build-ffmpeg.sh +++ b/scripts/build-ffmpeg.sh @@ -6,7 +6,7 @@ cd "./$1" shift ROOT="`pwd`" -TAG=n7.0 +TAG=n6.1 git clone https://git.ffmpeg.org/ffmpeg.git --depth 1 -b $TAG && cd ffmpeg || exit 1 git apply ${SCRIPT_DIR}/flatpak/0001-lavc-vaapi_hevc-Fixup-invalid-references.patch || exit 1 diff --git a/scripts/flatpak/chiaki4deck-devel.yaml b/scripts/flatpak/chiaki4deck-devel.yaml index b9ef0cd82..5693631e9 100644 --- a/scripts/flatpak/chiaki4deck-devel.yaml +++ b/scripts/flatpak/chiaki4deck-devel.yaml @@ -110,8 +110,8 @@ modules: - --enable-hwaccel=hevc_vulkan sources: - type: archive - url: https://ffmpeg.org/releases/ffmpeg-7.0.tar.xz - sha256: 4426a94dd2c814945456600c8adfc402bee65ec14a70e8c531ec9a2cd651da7b + url: https://ffmpeg.org/releases/ffmpeg-6.1.tar.xz + sha256: 488c76e57dd9b3bee901f71d5c95eaf1db4a5a31fe46a28654e837144207c270 - type: patch path: 0001-lavc-vaapi_hevc-Fixup-invalid-references.patch - type: patch diff --git a/scripts/flatpak/chiaki4deck.yaml b/scripts/flatpak/chiaki4deck.yaml index 5f07a008a..63d8dda5f 100644 --- a/scripts/flatpak/chiaki4deck.yaml +++ b/scripts/flatpak/chiaki4deck.yaml @@ -112,8 +112,8 @@ modules: - --enable-hwaccel=hevc_vulkan sources: - type: archive - url: https://ffmpeg.org/releases/ffmpeg-7.0.tar.xz - sha256: 4426a94dd2c814945456600c8adfc402bee65ec14a70e8c531ec9a2cd651da7b + url: https://ffmpeg.org/releases/ffmpeg-6.1.tar.xz + sha256: 488c76e57dd9b3bee901f71d5c95eaf1db4a5a31fe46a28654e837144207c270 - type: patch path: 0001-lavc-vaapi_hevc-Fixup-invalid-references.patch - type: patch