Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Oct 2024 10:59:57 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: b08638f69423 - 2024Q3 - multimedia/obs-studio: fix build with clang 19
Message-ID:  <202410071059.497Axvbg068813@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2024Q3 has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b08638f69423264c169e1dcef888eeafbdaae395

commit b08638f69423264c169e1dcef888eeafbdaae395
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-10-06 10:46:46 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-10-07 10:59:44 +0000

    multimedia/obs-studio: fix build with clang 19
    
    Clang 19 has become more strict about mixing different enum types, which
    results in an error building multimedia/obs-studio:
    
      /wrkdirs/usr/ports/multimedia/obs-studio/work/obs-studio-30.2.3/plugins/obs-outputs/flv-mux.c:659:37: error: bitwise operation between different enumeration types ('enum multitrack_type_t' and 'enum packet_type_t') [-Werror,-Wenum-enum-conversion]
        659 |                 s_w8(&s, MULTITRACKTYPE_ONE_TRACK | PACKETTYPE_METADATA);
            |                          ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
    
    This can be fixed by explicitly casting each enum type to uint8_t.
    
    PR:             281890
    Approved by:    yuri (maintainer)
    MFH:            2024Q3
    
    (cherry picked from commit f0e9df3448bd5a567b9447dc711d0a5f0341a327)
---
 .../obs-studio/files/patch-plugins_obs-outputs_flv-mux.c      | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/multimedia/obs-studio/files/patch-plugins_obs-outputs_flv-mux.c b/multimedia/obs-studio/files/patch-plugins_obs-outputs_flv-mux.c
new file mode 100644
index 000000000000..14375e85281e
--- /dev/null
+++ b/multimedia/obs-studio/files/patch-plugins_obs-outputs_flv-mux.c
@@ -0,0 +1,11 @@
+--- plugins/obs-outputs/flv-mux.c.orig	2024-08-15 21:53:35 UTC
++++ plugins/obs-outputs/flv-mux.c
+@@ -656,7 +656,7 @@ void flv_packet_metadata(enum video_id_t codec_id, uin
+ 	 * The default trackId is 0.
+ 	 */
+ 	if (is_multitrack) {
+-		s_w8(&s, MULTITRACKTYPE_ONE_TRACK | PACKETTYPE_METADATA);
++		s_w8(&s, (uint8_t)MULTITRACKTYPE_ONE_TRACK | (uint8_t)PACKETTYPE_METADATA);
+ 		s_w4cc(&s, codec_id);
+ 		// trackId
+ 		s_w8(&s, (uint8_t)idx);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410071059.497Axvbg068813>