Re: graphics/ffmpeg: update to 9.0.1

Kirill A. Korinsky <[email protected]>
Newsgroups gmane.os.openbsd.ports
Message-ID <[email protected]>
On Sun, 23 Aug 2026 16:22:53 +0200,
Theo Buehler <[email protected]> wrote:
> 
> On Sun, Aug 23, 2026 at 06:50:10AM -0400, Brad Smith wrote:
> > On Sun, Aug 23, 2026 at 10:53:25AM +0200, Kirill A. Korinsky wrote:
> > > On Thu, 13 Aug 2026 12:13:54 +0200,
> > > Kirill A. Korinsky <[email protected]> wrote:
> > > > 
> > > > ports@, Brad,
> > > > 
> > > > here a diff to update graphics/ffmpeg to 9.0.1, and it fixes and bumps
> > > > x11/mplayer as well.
> > > > 
> > > > Bulk on amd64 with previous diffs and this one successeded, unsigned
> > > > packages available here: https://kirill.korins.ky/pub/packages/ffmpeg-9.0.1/
> > > > 
> > > > Tests and OKs are welcome.
> > > > 
> > > 
> > > The previous version was without subject what is fixed now.
> > > 
> > > Also, it survives a few bulks on amd64 but I haven't tested BTI/IBT amd64,
> > > so any tests are welcome.
> > 
> > Here is an updated diff. The configure patch SSL changes can be
> > simplified a bit and add in my MIPS fix for CABAC.
> 
> It works for me in some light testing. Tests run into segfaults on both
> amd64 and arm64, which is not necessarily a blocker but a bit annoying.
> 
> Quite a few tests do run with amd64/ibt without SIGILL, so that is
> reassuring.
> 
> 
> apple M1:
> 
> NEON:
> FAILURE: float_fft_16384_neon (segmentation fault)
>  - av_tx             [FAILED]
> checkasm: 1 of 8 tests failed
> threads=1
> 
> on both
> 
> cpu0: 12th Gen Intel(R) Core(TM) i7-1260P, 1995.55 MHz, 06-9a-03, patch 0000043b
> cpu0: AMD Ryzen 7 PRO 5850U with Radeon Graphics, 1900.00 MHz, 19-50-00, patch 0a500012
> 
> I see this:
> 
> ffmpeg version 9.0.1 Copyright (c) 2000-2026 the FFmpeg developers
>   built with OpenBSD clang version 22.1.6
>   configuration: --enable-shared --arch=amd64 --cc=cc --cxx=c++ --enable-debug --disable-stripping --disable-indev=jack --disable-vulkan --enable-fontconfig --enable-frei0r --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libdav1d --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libopus --enable-libspeex --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nonfree --enable-openssl --enable-libvidstab --extra-cflags='-I/usr/local/include -I/usr/X11R6/include' --extra-libs='-L/usr/local/lib -L/usr/X11R6/lib' --extra-ldsoflags= --mandir=/usr/loc
 al/man --objcc=/usr/bin/false --optflags='-O2 -pipe -g -Wno-redundant-decls'
>   libavutil      61.  1.101 / 61.  1.101
>   libavcodec     63.  1.101 / 63.  1.101
>   libavformat    63.  1.101 / 63.  1.101
>   libavdevice    63.  1.101 / 63.  1.101
>   libavfilter    12.  1.101 / 12.  1.101
>   libswscale     10.  1.101 / 10.  1.101
>   libswresample   7.  1.101 /  7.  1.101
> Stream mapping:
>   crop:default -> Stream #0:0 (rawvideo)
> Segmentation fault (core dumped) 
> threads=1
> 
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  memcpy (dst0=0xf3c943c2000, src0=0xf3c87d941c4 <ff_init_hscaler_mmxext+180>, length=44)
>     at /usr/src/lib/libc/string/memcpy.c:97
> 97			TLOOP1(*dst++ = *src++);
> [Current thread is 1 (process 148644)]
> (gdb) bt
> #0  memcpy (dst0=0xf3c943c2000, src0=0xf3c87d941c4 <ff_init_hscaler_mmxext+180>, length=44)
>     at /usr/src/lib/libc/string/memcpy.c:97
> #1  0x00000f3c87d943b5 in ff_init_hscaler_mmxext (dstW=40032, xInc=65504,
>     filterCode=0xf3c943c2000 "", filter=0xf3bda2a8000, filterPos=0xf3c966f6000,
>     numSplits=<optimized out>) at src/libswscale/x86/hscale_fast_bilinear_simd.c:157
> #2  0x00000f3c87d90eb0 in ff_sws_init_single_context (sws=0xf3c09903000,
>     srcFilter=0xf3c227dd770, dstFilter=0xf3c227dd770) at src/libswscale/utils.c:1705
> #3  0x00000f3c87c9c8ab in add_legacy_sws_pass (graph=0xf3c2131d400, src=0xf3c227dd988,
>     dst=0xf3c227dd900, input=0x0, output=0xf3c227dd8e8) at src/libswscale/graph.c:584
> 
> 

Thanks for testing amd64, here updated diff which fixes a bug.

I not sure that it is upstremable, heh.

My fast arm64 is not responsed and I'll be near here at end of the week. I
try to think what can be broken in that test, but not yet sure

Anyway, current diff:

Index: graphics/ffmpeg/Makefile
===================================================================
RCS file: /home/cvs/ports/graphics/ffmpeg/Makefile,v
diff -u -p -r1.260 Makefile
--- graphics/ffmpeg/Makefile	17 Jun 2026 17:13:06 -0000	1.260
+++ graphics/ffmpeg/Makefile	23 Aug 2026 12:04:14 -0000
@@ -1,7 +1,7 @@
 COMMENT=	audio/video converter and streamer
 
 # keep it synced with x11/mplayer
-V=		8.1.2
+V=		9.0.1
 DISTNAME=	ffmpeg-${V}
 CATEGORIES=	graphics multimedia
 SITES=		https://ffmpeg.org/releases/
@@ -22,13 +22,13 @@ USE_NOBTCFI-amd64=	Yes
 
 EPOCH=		1
 
-SHARED_LIBS=	avcodec		27.2 \
-		avdevice	15.1 \
-		avfilter	13.2 \
-		avformat	24.2 \
-		avutil		17.2 \
-		swresample	6.1 \
-		swscale		9.2
+SHARED_LIBS=	avcodec		28.0 \
+		avdevice	16.0 \
+		avfilter	14.0 \
+		avformat	25.0 \
+		avutil		18.0 \
+		swresample	7.0 \
+		swscale		10.0
 
 HOMEPAGE=	https://ffmpeg.org/
 
Index: graphics/ffmpeg/distinfo
===================================================================
RCS file: /home/cvs/ports/graphics/ffmpeg/distinfo,v
diff -u -p -r1.74 distinfo
--- graphics/ffmpeg/distinfo	17 Jun 2026 17:13:06 -0000	1.74
+++ graphics/ffmpeg/distinfo	23 Aug 2026 12:04:14 -0000
@@ -1,2 +1,2 @@
-SHA256 (ffmpeg-8.1.2.tar.xz) = RkvrXnvwwxHmi0WuLwTpzCr4iFGrtAgiMXQqdNl7Ukw=
-SIZE (ffmpeg-8.1.2.tar.xz) = 11710924
+SHA256 (ffmpeg-9.0.1.tar.xz) = zzjg4ox+VgWULEp3dVNJsBRYBKOXrzfrH7THfLI39jU=
+SIZE (ffmpeg-9.0.1.tar.xz) = 12036420
Index: graphics/ffmpeg/patches/patch-configure
===================================================================
RCS file: /home/cvs/ports/graphics/ffmpeg/patches/patch-configure,v
diff -u -p -r1.80 patch-configure
--- graphics/ffmpeg/patches/patch-configure	2 Jun 2026 21:29:05 -0000	1.80
+++ graphics/ffmpeg/patches/patch-configure	23 Aug 2026 12:04:14 -0000
@@ -3,7 +3,7 @@
 Index: configure
 --- configure.orig
 +++ configure
-@@ -6076,7 +6076,6 @@ case $target_os in
+@@ -6159,7 +6159,6 @@ case $target_os in
          enable section_data_rel_ro
          striptype=""
          SHFLAGS='-shared'
@@ -11,7 +11,7 @@ Index: configure
          SLIB_INSTALL_LINKS=
          oss_indev_extralibs="-lossaudio"
          oss_outdev_extralibs="-lossaudio"
-@@ -6451,7 +6450,7 @@ set_default libdir
+@@ -6534,7 +6533,7 @@ set_default libdir
  set_default $PATHS_LIST
  set_default nm
  
@@ -20,7 +20,7 @@ Index: configure
  
  enable_weak_pic() {
      disabled pic && return
-@@ -6745,11 +6744,19 @@ elif enabled x86; then
+@@ -6830,11 +6829,19 @@ elif enabled x86; then
      # As 'i' is stored on the stack, this program will crash
      # if the base pointer is used to access it because the
      # base pointer is cleared in the inline assembly code.
@@ -41,7 +41,7 @@ Index: configure
  
      # check whether EBX is available on x86
      check_inline_asm ebx_available '""::"b"(0)' &&
-@@ -7002,7 +7009,7 @@ check_headers asm/types.h
+@@ -7090,7 +7097,7 @@ check_headers asm/types.h
  #
  # some configurations also require linking to libatomic, so try
  # both with -latomic and without
@@ -50,22 +50,12 @@ Index: configure
      check_builtin stdatomic stdatomic.h                                \
          "atomic_int foo, bar = -1; atomic_store(&foo, 0); foo += bar"  \
          $LATOMIC && eval stdatomic_extralibs="\$LATOMIC" && break
-@@ -7489,13 +7496,13 @@ enabled omx_rpi           && { test_code cc OMX_Core.h
- enabled omx               && require_headers OMX_Core.h && \
-     warn "The OpenMAX encoders are deprecated and will be removed in future versions"
- 
--enabled openssl           && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h DTLS_get_data_mtu &&
-+enabled openssl           && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h OPENSSL_init_ssl &&
+@@ -7551,7 +7558,7 @@ enabled opengl            && { check_lib opengl GL/glx
+ enabled openssl           && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h DTLS_get_data_mtu &&
                                   { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } ||
                                 { enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } ||
 -                               check_pkg_config openssl "openssl >= 1.1.1" openssl/ssl.h DTLS_get_data_mtu ||
--                               check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto ||
--                               check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto -lws2_32 -lgdi32 ||
--                               die "ERROR: openssl (>= 1.1.1) not found"; }
 +                               check_pkg_config openssl "openssl >= 1.1.0" openssl/ssl.h OPENSSL_init_ssl ||
-+                               check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
-+                               check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto -lws2_32 -lgdi32 ||
-+                               die "ERROR: openssl (>= 1.1.0) not found"; }
- enabled pocketsphinx      && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
- enabled rkmpp             && { require_pkg_config rkmpp "rockchip_mpp >= 1.3.8" "rockchip/rk_mpi.h rockchip/mpp_buffer.h" "mpp_create mpp_buffer_sync_begin_f" &&
-                                { enabled libdrm ||
+                                check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto ||
+                                check_lib openssl openssl/ssl.h DTLS_get_data_mtu -lssl -lcrypto -lws2_32 -lgdi32 ||
+                                die "ERROR: openssl (>= 1.1.1) not found"; }
Index: graphics/ffmpeg/patches/patch-ffbuild_library_mak
===================================================================
RCS file: /home/cvs/ports/graphics/ffmpeg/patches/patch-ffbuild_library_mak,v
diff -u -p -r1.5 patch-ffbuild_library_mak
--- graphics/ffmpeg/patches/patch-ffbuild_library_mak	21 May 2026 16:24:15 -0000	1.5
+++ graphics/ffmpeg/patches/patch-ffbuild_library_mak	23 Aug 2026 12:04:14 -0000
@@ -1,7 +1,7 @@
 Index: ffbuild/library.mak
 --- ffbuild/library.mak.orig
 +++ ffbuild/library.mak
-@@ -96,8 +96,6 @@ clean::
+@@ -113,8 +113,6 @@ clean::
  install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
  	$(Q)mkdir -p "$(SHLIBDIR)"
  	$$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)"
Index: graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h
diff -N graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h
--- graphics/ffmpeg/patches/patch-libavcodec_cabac_functions_h	20 Jan 2026 17:22:00 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-
-Disable mips64-specific asm code that clang fails to assemble.
-
-Index: libavcodec/cabac_functions.h
---- libavcodec/cabac_functions.h.orig
-+++ libavcodec/cabac_functions.h
-@@ -48,7 +48,7 @@
- #if ARCH_X86
- #   include "x86/cabac.h"
- #endif
--#if ARCH_MIPS
-+#if 0
- #   include "mips/cabac.h"
- #endif
- #if ARCH_LOONGARCH64
Index: graphics/ffmpeg/patches/patch-libavcodec_mips_cabac_h
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libavcodec_mips_cabac_h
diff -N graphics/ffmpeg/patches/patch-libavcodec_mips_cabac_h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ graphics/ffmpeg/patches/patch-libavcodec_mips_cabac_h	23 Aug 2026 12:04:14 -0000
@@ -0,0 +1,89 @@
+- avcodec/mips/cabac: Fix building on OpenBSD/mips64
+  7c533d0f86f13a06ec93968f6194349665b3536a
+
+Index: libavcodec/mips/cabac.h
+--- libavcodec/mips/cabac.h.orig
++++ libavcodec/mips/cabac.h
+@@ -101,8 +101,15 @@ static av_always_inline int get_cabac_inline_mips(CABA
+ #else
+         "slt          %[tmp0],         %[c_bytestream],     %[c_bytestream_end]  \n\t"
+         PTR_ADDIU    "%[tmp2],         %[c_bytestream],     0x02                 \n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+         "movn         %[c_bytestream], %[tmp2],             %[tmp0]              \n\t"
++#else
++        "beqz         %[tmp0],         2f                                      \n\t"
++        " nop                                                               \n\t"
++        "move         %[c_bytestream], %[tmp2]                               \n\t"
++        "2:                                                                 \n\t"
+ #endif
++#endif
+         "1:                                                        \n\t"
+     : [bit]"=&r"(bit), [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1), [tmp2]"=&r"(tmp2),
+       [c_range]"+&r"(c->range), [c_low]"+&r"(c->low),
+@@ -152,14 +159,29 @@ static av_always_inline int get_cabac_bypass_mips(CABA
+ #else
+         "slt        %[tmp0],         %[c_bytestream], %[c_bytestream_end] \n\t"
+         PTR_ADDIU  "%[tmp1],         %[c_bytestream], 0x02                \n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+         "movn       %[c_bytestream], %[tmp1],         %[tmp0]             \n\t"
++#else
++        "beqz       %[tmp0],         2f                                  \n\t"
++        " nop                                                            \n\t"
++        "move       %[c_bytestream], %[tmp1]                              \n\t"
++        "2:                                                              \n\t"
+ #endif
++#endif
+         "1:                                                               \n\t"
+         PTR_SLL    "%[tmp1],         %[c_range],      0x11                \n\t"
+         "slt        %[tmp0],         %[c_low],        %[tmp1]             \n\t"
+         PTR_SUBU   "%[tmp1],         %[c_low],        %[tmp1]             \n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+         "movz       %[res],          %[one],          %[tmp0]             \n\t"
+         "movz       %[c_low],        %[tmp1],         %[tmp0]             \n\t"
++#else
++        "bnez       %[tmp0],         2f                                \n\t"
++        " nop                                                      \n\t"
++        "move       %[res],          %[one]                          \n\t"
++        "move       %[c_low],        %[tmp1]                         \n\t"
++        "2:                                                       \n\t"
++#endif
+         : [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1), [res]"+&r"(res),
+           [c_range]"+&r"(c->range), [c_low]"+&r"(c->low),
+           [c_bytestream]"+&r"(c->bytestream)
+@@ -204,15 +226,36 @@ static av_always_inline int get_cabac_bypass_sign_mips
+ #else
+         "slt        %[tmp0],         %[c_bytestream], %[c_bytestream_end] \n\t"
+         PTR_ADDIU  "%[tmp1],         %[c_bytestream], 0x02                \n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+         "movn       %[c_bytestream], %[tmp1],         %[tmp0]             \n\t"
++#else
++        "beqz       %[tmp0],         2f                                  \n\t"
++        " nop                                                            \n\t"
++        "move       %[c_bytestream], %[tmp1]                              \n\t"
++        "2:                                                              \n\t"
+ #endif
++#endif
+         "1:                                                               \n\t"
+         PTR_SLL    "%[tmp1],         %[c_range],      0x11                \n\t"
+         "slt        %[tmp0],         %[c_low],        %[tmp1]             \n\t"
+         PTR_SUBU   "%[tmp1],         %[c_low],        %[tmp1]             \n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+         "movz       %[c_low],        %[tmp1],         %[tmp0]             \n\t"
++#else
++        "bnez       %[tmp0],         2f                                  \n\t"
++        " nop                                                            \n\t"
++        "move       %[c_low],        %[tmp1]                              \n\t"
++        "2:                                                              \n\t"
++#endif
+         PTR_SUBU   "%[tmp1],         %[zero],         %[res]              \n\t"
++#if HAVE_MIPS32R2 || HAVE_MIPS64R2
+         "movn       %[res],          %[tmp1],         %[tmp0]             \n\t"
++#else
++        "beqz       %[tmp0],         3f                                  \n\t"
++        " nop                                                            \n\t"
++        "move       %[res],          %[tmp1]                              \n\t"
++        "3:                                                              \n\t"
++#endif
+         : [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1), [res]"+&r"(res),
+           [c_range]"+&r"(c->range), [c_low]"+&r"(c->low),
+           [c_bytestream]"+&r"(c->bytestream)
Index: graphics/ffmpeg/patches/patch-libavformat_avformat_h
===================================================================
RCS file: /home/cvs/ports/graphics/ffmpeg/patches/patch-libavformat_avformat_h,v
diff -u -p -r1.7 patch-libavformat_avformat_h
--- graphics/ffmpeg/patches/patch-libavformat_avformat_h	21 May 2026 16:24:15 -0000	1.7
+++ graphics/ffmpeg/patches/patch-libavformat_avformat_h	23 Aug 2026 12:04:14 -0000
@@ -3,7 +3,7 @@ Add av_stream_get_first_dts for Chromium
 Index: libavformat/avformat.h
 --- libavformat/avformat.h.orig
 +++ libavformat/avformat.h
-@@ -1178,6 +1178,10 @@ typedef struct AVStreamGroup {
+@@ -1229,6 +1229,10 @@ typedef struct AVStreamGroup {
  
  struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
  
Index: graphics/ffmpeg/patches/patch-libavformat_tls_openssl_c
===================================================================
RCS file: /home/cvs/ports/graphics/ffmpeg/patches/patch-libavformat_tls_openssl_c,v
diff -u -p -r1.4 patch-libavformat_tls_openssl_c
--- graphics/ffmpeg/patches/patch-libavformat_tls_openssl_c	21 May 2026 16:24:15 -0000	1.4
+++ graphics/ffmpeg/patches/patch-libavformat_tls_openssl_c	23 Aug 2026 12:04:14 -0000
@@ -1,17 +1,16 @@
 Index: libavformat/tls_openssl.c
 --- libavformat/tls_openssl.c.orig
 +++ libavformat/tls_openssl.c
-@@ -32,13 +32,18 @@
- #include <openssl/ssl.h>
- #include <openssl/err.h>
- #include <openssl/x509v3.h>
-+#include <string.h>
+@@ -39,6 +39,8 @@
+ #endif
+ #include <string.h>
  
 +#define TLS_ST_OK SSL_ST_OK
 +
+ #define DTLS_HANDSHAKE_TIMEOUT_US 30000000
  /**
   * Convert an EVP_PKEY to a PEM string.
-  */
+@@ -46,6 +48,8 @@
  static int pkey_to_pem_string(EVP_PKEY *pkey, char *out, size_t out_sz)
  {
      BIO *mem = NULL;
@@ -20,7 +19,7 @@ Index: libavformat/tls_openssl.c
      size_t read_bytes = 0;
  
      if (!pkey || !out || !out_sz)
-@@ -50,9 +55,13 @@ static int pkey_to_pem_string(EVP_PKEY *pkey, char *ou
+@@ -57,9 +61,13 @@ static int pkey_to_pem_string(EVP_PKEY *pkey, char *ou
      if (!PEM_write_bio_PrivateKey(mem, pkey, NULL, NULL, 0, NULL, NULL))
          goto done;
  
@@ -35,7 +34,7 @@ Index: libavformat/tls_openssl.c
  done:
      BIO_free(mem);
      if (out && out_sz)
-@@ -66,6 +75,8 @@ done:
+@@ -73,6 +81,8 @@ done:
  static int cert_to_pem_string(X509 *cert, char *out, size_t out_sz)
  {
      BIO *mem = NULL;
@@ -44,7 +43,7 @@ Index: libavformat/tls_openssl.c
      size_t read_bytes = 0;
  
      if (!cert || !out || !out_sz)
-@@ -77,9 +88,13 @@ static int cert_to_pem_string(X509 *cert, char *out, s
+@@ -84,9 +94,13 @@ static int cert_to_pem_string(X509 *cert, char *out, s
      if (!PEM_write_bio_X509(mem, cert))
          goto done;
  
@@ -59,21 +58,21 @@ Index: libavformat/tls_openssl.c
  done:
      BIO_free(mem);
      if (out && out_sz)
-@@ -801,7 +816,9 @@ static int dtls_start(URLContext *h, const char *url, 
-         s->mtu = 1096;
-     SSL_set_options(c->ssl, SSL_OP_NO_QUERY_MTU);
-     SSL_set_mtu(c->ssl, s->mtu);
+@@ -847,7 +861,9 @@ static int tls_open(URLContext *h, const char *uri, in
+             s->mtu = 1096;
+         SSL_set_options(c->ssl, SSL_OP_NO_QUERY_MTU);
+         SSL_set_mtu(c->ssl, s->mtu);
 +#ifdef DTLS_set_link_mtu
-     DTLS_set_link_mtu(c->ssl, s->mtu);
+         DTLS_set_link_mtu(c->ssl, s->mtu);
 +#endif
-     init_bio_method(h);
+     }
  
-     /* This seems to be necessary despite explicitly setting client/server method above. */
-@@ -925,10 +942,12 @@ static int tls_write(URLContext *h, const uint8_t *buf
+     init_bio_method(h);
+@@ -960,10 +976,12 @@ static int tls_write(URLContext *h, const uint8_t *buf
      uc->flags &= ~AVIO_FLAG_NONBLOCK;
      uc->flags |= h->flags & AVIO_FLAG_NONBLOCK;
  
-+#ifdef DTLS_get_link_mtu
++#ifdef DTLS_get_data_mtu
      if (s->is_dtls) {
          const size_t mtu_size = DTLS_get_data_mtu(c->ssl);
          size = FFMIN(size, mtu_size);
Index: graphics/ffmpeg/patches/patch-libswscale_x86_hscale_fast_bilinear_simd_c
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libswscale_x86_hscale_fast_bilinear_simd_c
diff -N graphics/ffmpeg/patches/patch-libswscale_x86_hscale_fast_bilinear_simd_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ graphics/ffmpeg/patches/patch-libswscale_x86_hscale_fast_bilinear_simd_c	23 Aug 2026 22:12:04 -0000
@@ -0,0 +1,35 @@
+Index: libswscale/x86/hscale_fast_bilinear_simd.c
+--- libswscale/x86/hscale_fast_bilinear_simd.c.orig
++++ libswscale/x86/hscale_fast_bilinear_simd.c
+@@ -53,6 +53,7 @@ av_cold int ff_init_hscaler_mmxext(int dstW, int xInc,
+     // code fragment
+ 
+     __asm__ volatile (
++        ".pushsection .rodata                           \n\t"
+         "jmp                         9f                 \n\t"
+         // Begin
+         "0:                                             \n\t"
+@@ -76,6 +77,7 @@ av_cold int ff_init_hscaler_mmxext(int dstW, int xInc,
+         "add                         $8, %%"FF_REG_a"   \n\t"
+         // End
+         "9:                                             \n\t"
++        ".popsection                                    \n\t"
+         "lea       " LOCAL_MANGLE(0b) ", %0             \n\t"
+         "lea       " LOCAL_MANGLE(1b) ", %1             \n\t"
+         "lea       " LOCAL_MANGLE(2b) ", %2             \n\t"
+@@ -92,6 +94,7 @@ av_cold int ff_init_hscaler_mmxext(int dstW, int xInc,
+         );
+ 
+     __asm__ volatile (
++        ".pushsection .rodata                           \n\t"
+         "jmp                         9f                 \n\t"
+         // Begin
+         "0:                                             \n\t"
+@@ -113,6 +116,7 @@ av_cold int ff_init_hscaler_mmxext(int dstW, int xInc,
+         "add                         $8, %%"FF_REG_a"   \n\t"
+         // End
+         "9:                                             \n\t"
++        ".popsection                                    \n\t"
+         "lea       " LOCAL_MANGLE(0b) ", %0             \n\t"
+         "lea       " LOCAL_MANGLE(1b) ", %1             \n\t"
+         "lea       " LOCAL_MANGLE(2b) ", %2             \n\t"
Index: graphics/ffmpeg/patches/patch-libswscale_x86_ops_int_asm
===================================================================
RCS file: graphics/ffmpeg/patches/patch-libswscale_x86_ops_int_asm
diff -N graphics/ffmpeg/patches/patch-libswscale_x86_ops_int_asm
--- graphics/ffmpeg/patches/patch-libswscale_x86_ops_int_asm	13 Jun 2026 11:17:07 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-Index: libswscale/x86/ops_int.asm
---- libswscale/x86/ops_int.asm.orig
-+++ libswscale/x86/ops_int.asm
-@@ -106,6 +106,7 @@ IF %1 > 3,  mov out3q, [execq + SwsOpExec.out3]
- %endif
- align function_align
- current_function %+ _return:
-+    _CET_ENDBR
- 
-             ; op chain always returns back here
-             mov implq, [rsp + 8]
Index: graphics/ffmpeg/pkg/PLIST
===================================================================
RCS file: /home/cvs/ports/graphics/ffmpeg/pkg/PLIST,v
diff -u -p -r1.45 PLIST
--- graphics/ffmpeg/pkg/PLIST	21 May 2026 16:24:15 -0000	1.45
+++ graphics/ffmpeg/pkg/PLIST	23 Aug 2026 12:04:14 -0000
@@ -122,6 +122,7 @@ include/libavutil/pixelutils.h
 include/libavutil/pixfmt.h
 include/libavutil/random_seed.h
 include/libavutil/rational.h
+include/libavutil/raw_color_params.h
 include/libavutil/rc4.h
 include/libavutil/refstruct.h
 include/libavutil/replaygain.h
Index: x11/mplayer/Makefile
===================================================================
RCS file: /home/cvs/ports/x11/mplayer/Makefile,v
diff -u -p -r1.344 Makefile
--- x11/mplayer/Makefile	19 Aug 2026 12:56:58 -0000	1.344
+++ x11/mplayer/Makefile	23 Aug 2026 12:04:14 -0000
@@ -1,8 +1,8 @@
 COMMENT=	movie player supporting many formats
 
 V=		20251123
-FFMPEG_V=	8.1.2
-REVISION=	4
+FFMPEG_V=	9.0.1
+REVISION=	5
 DISTNAME=	mplayer-${V}
 CATEGORIES=	x11 multimedia
 SITES=		https://comstyle.com/source/


-- 
wbr, Kirill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.