Index | Thread | Search

From:
Brad Smith <brad@comstyle.com>
Subject:
UPDATE: cmus
To:
ports@openbsd.org
Date:
Sat, 23 Mar 2024 03:49:22 -0400

Download raw body.

Thread
  • Brad Smith:

    UPDATE: cmus

Fix building with newer FFmpeg.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/audio/cmus/Makefile,v
retrieving revision 1.30
diff -u -p -u -p -r1.30 Makefile
--- Makefile	19 May 2023 10:44:38 -0000	1.30
+++ Makefile	12 Jun 2023 02:25:01 -0000
@@ -6,7 +6,7 @@ V=			2.10.0
 GH_ACCOUNT=		cmus
 GH_PROJECT=		cmus
 GH_TAGNAME=		v${V}
-REVISION=		0
+REVISION=		1
 CATEGORIES=		audio
 HOMEPAGE=		https://cmus.github.io/
 
Index: patches/patch-ip_ffmpeg_c
===================================================================
RCS file: /home/cvs/ports/audio/cmus/patches/patch-ip_ffmpeg_c,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-ip_ffmpeg_c
--- patches/patch-ip_ffmpeg_c	19 May 2023 10:44:39 -0000	1.1
+++ patches/patch-ip_ffmpeg_c	10 Jul 2023 00:49:28 -0000
@@ -1,16 +1,16 @@
-Fix build with newer FFmpeg.
+Remove AV_CODEC_{CAP,FLAG}_TRUNCATED for FFmpeg 6 compatibility
+https://github.com/cmus/cmus/commit/07ce2dc7082a1ed8704c21fd3f2877c8ba6b12f9
 
 Index: ip/ffmpeg.c
 --- ip/ffmpeg.c.orig
 +++ ip/ffmpeg.c
-@@ -202,8 +202,10 @@ static int ffmpeg_open(struct input_plugin_data *ip_da
+@@ -202,9 +202,6 @@ static int ffmpeg_open(struct input_plugin_data *ip_da
  			break;
  		}
  
-+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 18, 100)
- 		if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
- 			cc->flags |= AV_CODEC_FLAG_TRUNCATED;
-+#endif
- 
+-		if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
+-			cc->flags |= AV_CODEC_FLAG_TRUNCATED;
+-
  		if (avcodec_open2(cc, codec, NULL) < 0) {
  			d_print("could not open codec: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id));
+ 			err = -IP_ERROR_UNSUPPORTED_FILE_TYPE;