From 48ff296a8755a62093ac0f3e86b2d9fbebb2b671 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Thu, 4 Jan 2024 08:02:11 +0100 Subject: [PATCH] ffmpeg: Update to 6.1.1 0015-guard-null-hw-frames-ctx.patch: included in the release --- .../0015-guard-null-hw-frames-ctx.patch | 69 ------------------- mingw-w64-ffmpeg/PKGBUILD | 15 ++-- 2 files changed, 5 insertions(+), 79 deletions(-) delete mode 100644 mingw-w64-ffmpeg/0015-guard-null-hw-frames-ctx.patch diff --git a/mingw-w64-ffmpeg/0015-guard-null-hw-frames-ctx.patch b/mingw-w64-ffmpeg/0015-guard-null-hw-frames-ctx.patch deleted file mode 100644 index 57545acdeb..0000000000 --- a/mingw-w64-ffmpeg/0015-guard-null-hw-frames-ctx.patch +++ /dev/null @@ -1,69 +0,0 @@ -Guard against segfault running VLC decoding under msys2 [1]: - -Thread 33 received signal SIGSEGV, Segmentation fault. -[Switching to Thread 37728.0xadd0] -ff_hwaccel_frame_priv_alloc (avctx=0x6447b00, hwaccel_picture_private=0x65dfd00) - at libavcodec/decode.c:1848 -1848 frames_ctx = (AVHWFramesContext *)avctx->hw_frames_ctx->data; -(gdb) bt - at libavcodec/decode.c:1848 - at libavcodec/h264_slice.c:208 - first_slice=1) at libavcodec/h264_slice.c:1599 - at libavcodec/h264_slice.c:2130 - at libavcodec/h264dec.c:652 - got_frame=0x646e4b0, avpkt=0x64522c0) at libavcodec/h264dec.c:1048 - -(gdb) p avctx -$1 = (AVCodecContext *) 0x6447b00 -(gdb) p avctx->hw_frames_ctx -$2 = (AVBufferRef *) 0x0 - -v2: check for free_frame_priv (Hendrik) -v3: return EINVAL (Christoph Reiter) - -See[1]: https://github.com/msys2/MINGW-packages/pull/19050 -Fixes: be07145109 ("avcodec: add AVHWAccel.free_frame_priv callback") -CC: Lynne -CC: Christoph Reiter -Signed-off-by: Dmitry Rogozhkin ---- - libavcodec/decode.c | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -diff --git a/libavcodec/decode.c b/libavcodec/decode.c -index ad39021..50c3995 100644 ---- a/libavcodec/decode.c -+++ b/libavcodec/decode.c -@@ -1838,17 +1838,25 @@ int ff_copy_palette(void *dst, const AVPacket *src, void *logctx) - int ff_hwaccel_frame_priv_alloc(AVCodecContext *avctx, void **hwaccel_picture_private) - { - const FFHWAccel *hwaccel = ffhwaccel(avctx->hwaccel); -- AVHWFramesContext *frames_ctx; - - if (!hwaccel || !hwaccel->frame_priv_data_size) - return 0; - - av_assert0(!*hwaccel_picture_private); - -- frames_ctx = (AVHWFramesContext *)avctx->hw_frames_ctx->data; -- *hwaccel_picture_private = ff_refstruct_alloc_ext(hwaccel->frame_priv_data_size, 0, -- frames_ctx->device_ctx, -- hwaccel->free_frame_priv); -+ if (hwaccel->free_frame_priv) { -+ AVHWFramesContext *frames_ctx; -+ -+ if (!avctx->hw_frames_ctx) -+ return AVERROR(EINVAL); -+ -+ *hwaccel_picture_private = ff_refstruct_alloc_ext(hwaccel->frame_priv_data_size, 0, -+ frames_ctx->device_ctx, -+ hwaccel->free_frame_priv); -+ } else { -+ *hwaccel_picture_private = ff_refstruct_allocz(hwaccel->frame_priv_data_size); -+ } -+ - if (!*hwaccel_picture_private) - return AVERROR(ENOMEM); - --- -1.8.3.1 \ No newline at end of file diff --git a/mingw-w64-ffmpeg/PKGBUILD b/mingw-w64-ffmpeg/PKGBUILD index d31c996802..8017876fd4 100644 --- a/mingw-w64-ffmpeg/PKGBUILD +++ b/mingw-w64-ffmpeg/PKGBUILD @@ -6,8 +6,8 @@ _realname=ffmpeg pkgbase="mingw-w64-${_realname}" pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=6.1 -pkgrel=2 +pkgver=6.1.1 +pkgrel=1 pkgdesc="Complete solution to record, convert and stream audio and video (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -69,16 +69,14 @@ source=(https://ffmpeg.org/releases/${_realname}-${pkgver}.tar.xz{,.asc} "pathtools.c" "pathtools.h" "0005-Win32-Add-path-relocation-to-frei0r-plugins-search.patch" - "0009-wrong-null-type.patch" - "0015-guard-null-hw-frames-ctx.patch") + "0009-wrong-null-type.patch") validpgpkeys=('FCF986EA15E6E293A5644F10B4322F04D67658D8') -sha256sums=('488c76e57dd9b3bee901f71d5c95eaf1db4a5a31fe46a28654e837144207c270' +sha256sums=('8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968' 'SKIP' 'ebf471173f5ee9c4416c10a78760cea8afaf1a4a6e653977321e8547ce7bf3c0' '1585ef1b61cf53a2ca27049c11d49e0834683dfda798f03547761375df482a90' '8c74e9b5800dbb41c33a60114712726ec768ad6de8f147c2eb30656fd4c899cc' - 'f76048e6e1944e15f646a52b75e75bc8906ca80f2a3124fba6a2050722750447' - 'ddad247ff44287b5d0089b5b910b4ba0272404c71b2ffb127e3cf833e8b1cb74') + 'f76048e6e1944e15f646a52b75e75bc8906ca80f2a3124fba6a2050722750447') # Helper macros to help make tasks easier # apply_patch_with_msg() { @@ -102,9 +100,6 @@ prepare() { 0005-Win32-Add-path-relocation-to-frei0r-plugins-search.patch apply_patch_with_msg 0009-wrong-null-type.patch - - # https://github.com/msys2/MINGW-packages/pull/19050#issuecomment-1810884473 - apply_patch_with_msg 0015-guard-null-hw-frames-ctx.patch } build() {