Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
To:
OpenBSD ports <ports@openbsd.org>, Brad Smith <brad@comstyle.com>
Date:
Thu, 13 Aug 2026 12:13:54 +0200

Download raw body.

Thread
  • Kirill A. Korinsky:

    (no subject)

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.

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	12 Aug 2026 21:05:33 -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	12 Aug 2026 21:08:08 -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	4 Aug 2026 23:24:30 -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,9 +50,9 @@ 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"
+@@ -7548,13 +7555,13 @@ enabled opengl            && { check_lib opengl GL/glx
+                                die "ERROR: opengl not found."
+                              }
  
 -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 &&
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	4 Aug 2026 23:24:30 -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-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	4 Aug 2026 23:24:30 -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	12 Aug 2026 21:08:37 -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,17 +58,17 @@ 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;
  
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	4 Aug 2026 23:53:23 -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.343 Makefile
--- x11/mplayer/Makefile	17 Jun 2026 17:14:17 -0000	1.343
+++ x11/mplayer/Makefile	12 Aug 2026 21:31:27 -0000
@@ -1,8 +1,8 @@
 COMMENT=	movie player supporting many formats
 
 V=		20251123
-FFMPEG_V=	8.1.2
-REVISION=	3
+FFMPEG_V=	9.0.1
+REVISION=	4
 DISTNAME=	mplayer-${V}
 CATEGORIES=	x11 multimedia
 SITES=		https://comstyle.com/source/
Index: x11/mplayer/patches/patch-libmpcodecs_ae_lavc_c
===================================================================
RCS file: x11/mplayer/patches/patch-libmpcodecs_ae_lavc_c
diff -N x11/mplayer/patches/patch-libmpcodecs_ae_lavc_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ x11/mplayer/patches/patch-libmpcodecs_ae_lavc_c	12 Aug 2026 21:31:07 -0000
@@ -0,0 +1,37 @@
+ffmpeg-9.0
+
+Index: libmpcodecs/ae_lavc.c
+--- libmpcodecs/ae_lavc.c.orig
++++ libmpcodecs/ae_lavc.c
+@@ -140,6 +140,9 @@ static int get_frame_size(audio_encoder_t *encoder)
+ 
+ int mpae_init_lavc(audio_encoder_t *encoder)
+ {
++	const enum AVSampleFormat *sample_fmts;
++	int i, num_sample_fmts, ret;
++
+ 	encoder->params.samples_per_frame = encoder->params.sample_rate;
+ 	encoder->params.bitrate = encoder->params.sample_rate * encoder->params.channels * 2 * 8;
+ 
+@@ -177,12 +180,15 @@ int mpae_init_lavc(audio_encoder_t *encoder)
+ 	lavc_actx->codec_id = lavc_acodec->id;
+ 	// put sample parameters
+ 	lavc_actx->sample_fmt = AV_SAMPLE_FMT_S16;
+-	if (lavc_acodec->sample_fmts) {
+-		const enum AVSampleFormat *fmts;
+-		lavc_actx->sample_fmt = lavc_acodec->sample_fmts[0]; // fallback to first format
+-		for (fmts = lavc_acodec->sample_fmts; *fmts != AV_SAMPLE_FMT_NONE; fmts++) {
+-			if (samplefmt2affmt(av_get_packed_sample_fmt(*fmts)) == encoder->params.sample_format) { // preferred format found
+-				lavc_actx->sample_fmt = *fmts;
++	ret = avcodec_get_supported_config(lavc_actx, NULL, AV_CODEC_CONFIG_SAMPLE_FORMAT,
++			0, (const void **) &sample_fmts, &num_sample_fmts);
++	if (ret < 0)
++		return 0;
++	if (sample_fmts) {
++		lavc_actx->sample_fmt = sample_fmts[0]; // fallback to first format
++		for (i = 0; i < num_sample_fmts; i++) {
++			if (samplefmt2affmt(av_get_packed_sample_fmt(sample_fmts[i])) == encoder->params.sample_format) { // preferred format found
++				lavc_actx->sample_fmt = sample_fmts[i];
+ 				break;
+ 			}
+ 		}


-- 
wbr, Kirill