meta: taglib: use std::min
authorMarvin Scholz <epirat07@gmail.com>
Mon, 11 Apr 2022 21:21:25 +0000 (23:21 +0200)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 14 Jan 2025 22:09:47 +0000 (23:09 +0100)
(cherry picked from commit 584fd17a9445d8d5f7d692b7416eec09b9240b0e)

Gbp-Pq: Name 0052-meta-taglib-use-std-min.patch

modules/meta_engine/taglib.cpp

index 810ad2c79d438d2f2c4ae02ad675d7e3f8dd6bab..958651042597c1e90473523387bf68e13606092b 100644 (file)
@@ -679,7 +679,7 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_meta_t* p_demux_meta, vlc_
              * but in our case it will be a '\0'
              * terminated string */
             char psz_ufid[64];
-            int max_size = __MIN( p_ufid->identifier().size(), 63);
+            int max_size = std::min<unsigned>( p_ufid->identifier().size(), 63);
             strncpy( psz_ufid, p_ufid->identifier().data(), max_size );
             psz_ufid[max_size] = '\0';
             vlc_meta_SetTrackID( p_meta, psz_ufid );