[vlc-commits] [Git][videolan/vlc][master] 5 commits: contrib: shout: update to 2.4.6
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Sep 16 07:16:36 UTC 2022
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
85268b42 by Alexandre Janniaux at 2022-09-16T05:25:02+00:00
contrib: shout: update to 2.4.6
The commit patches src/icy.c and src/legacy.c to include <stdlib.h> or
<stdio.h>, so as to avoid FTBFS where free(), malloc(), and snprintf()
have no valid prototype before usage.
- - - - -
cb5d59c9 by Alexandre Janniaux at 2022-09-16T05:25:02+00:00
configure.ac: bump libshout to 2.4.3
- - - - -
1b651397 by Alexandre Janniaux at 2022-09-16T05:25:02+00:00
shout: extract format from function call
It makes the call more readable, the line less long for the change into
shout_set_content_format, and it makes it easier to potentially change
the format later.
- - - - -
13b7adb9 by Alexandre Janniaux at 2022-09-16T05:25:02+00:00
shout: fix deprecated shout_set_* functions for meta
The shout_set_name/description/genre/url were deprecated[^1] in 2.4.0,
whereas the new shout_set_meta was added[^2] ten years ago which already
commented the previous function as obsolete.
[^1]: https://github.com/xiph/Icecast-libshout/commit/559e61ec7a1a02f2da6e7a2bfadfdb1b1147cccd
[^2]: https://github.com/xiph/Icecast-libshout/commit/932a7742213c0aa4c8f87da4fac32b16c6641ff3
Fixes the following warnings:
../../modules/access_output/shout.c: In function ‘Open’:
../../modules/access_output/shout.c:211:10: warning: ‘shout_set_name’ is deprecated: use shout_set_meta() with SHOUT_META_NAME [-Wdeprecated-declarations]
211 | || shout_set_name( p_shout, psz_name ) != SHOUTERR_SUCCESS
| ^~
In file included from ../../modules/access_output/shout.c:53:
/usr/include/shout/shout.h:348:5: note: declared here
348 | int shout_set_name(shout_t *self, const char *name) SHOUT_ATTR_F_DEPRECATED("use shout_set_meta() with SHOUT_META_NAME"); // obsolete
| ^~~~~~~~~~~~~~
../../modules/access_output/shout.c:212:10: warning: ‘shout_set_description’ is deprecated: use shout_set_meta() with SHOUT_META_DESCRIPTION [-Wdeprecated-declarations]
212 | || shout_set_description( p_shout, psz_description ) != SHOUTERR_SUCCESS
| ^~
/usr/include/shout/shout.h:357:5: note: declared here
357 | int shout_set_description(shout_t *self, const char *description) SHOUT_ATTR_F_DEPRECATED("use shout_set_meta() with SHOUT_META_DESCRIPTION"); // obsolete
| ^~~~~~~~~~~~~~~~~~~~~
../../modules/access_output/shout.c:213:10: warning: ‘shout_set_genre’ is deprecated: use shout_set_meta() with SHOUT_META_GENRE [-Wdeprecated-declarations]
213 | || shout_set_genre( p_shout, psz_genre ) != SHOUTERR_SUCCESS
| ^~
/usr/include/shout/shout.h:354:5: note: declared here
354 | int shout_set_genre(shout_t *self, const char *genre) SHOUT_ATTR_F_DEPRECATED("use shout_set_meta() with SHOUT_META_GENRE"); // obsolete
| ^~~~~~~~~~~~~~~
../../modules/access_output/shout.c:214:10: warning: ‘shout_set_url’ is deprecated: use shout_set_meta() with SHOUT_META_URL [-Wdeprecated-declarations]
214 | || shout_set_url( p_shout, psz_url ) != SHOUTERR_SUCCESS
| ^~
/usr/include/shout/shout.h:351:5: note: declared here
351 | int shout_set_url(shout_t *self, const char *url) SHOUT_ATTR_F_DEPRECATED("use shout_set_meta() with SHOUT_META_URL"); // obsolete
| ^~~~~~~~~~~~~
- - - - -
1acf4ffa by Alexandre Janniaux at 2022-09-16T05:25:02+00:00
shout: fix deprecated shout_set_format function
The version 2.4.3 added[^1] support for setting format usage, and codecs
which deprecates the previous way of setting the format.
The version 2.4.3 is currently available in bullseye (but not in buster).
[^1]: https://github.com/xiph/Icecast-libshout/commit/0ac03fde3bf40c5c79eb2a77f0105742ed62c047
Fixes the following warnings:
../../modules/access_output/shout.c:233:5: warning: ‘shout_set_format’ is deprecated: Use shout_set_content_format() [-Wdeprecated-declarations]
233 | i_ret = shout_set_format( p_shout, var_GetBool( p_access, SOUT_CFG_PREFIX "mp3" ) ?
| ^~~~~
/usr/include/shout/shout.h:361:5: note: declared here
361 | int shout_set_format(shout_t *self, unsigned int format) SHOUT_ATTR_F_DEPRECATED("Use shout_set_content_format()"); // obsolete
| ^~~~~~~~~~~~~~~~
- - - - -
8 changed files:
- configure.ac
- contrib/src/shout/SHA512SUMS
- + contrib/src/shout/add-missing-stdlib-stdio.patch
- − contrib/src/shout/libshout-arpa.patch
- − contrib/src/shout/no-examples.patch
- contrib/src/shout/rules.mak
- contrib/src/shout/shout-strings.patch
- modules/access_output/shout.c
Changes:
=====================================
configure.ac
=====================================
@@ -2294,7 +2294,7 @@ PKG_CHECK_MODULES(LIBVORBIS, [vorbis >= 1.1], [
PKG_ENABLE_MODULES_VLC([OGG], [], [ogg >= 1.0], [Ogg demux support], [auto], [${LIBVORBIS_CFLAGS}], [${LIBVORBIS_LIBS}])
if test "${enable_sout}" != "no"; then
dnl Check for libshout
- PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
+ PKG_ENABLE_MODULES_VLC([SHOUT], [access_output_shout], [shout >= 2.4.3], [libshout output plugin], [auto])
fi
dnl
=====================================
contrib/src/shout/SHA512SUMS
=====================================
@@ -1 +1 @@
-4d4b958947e020de3330d49d39d59220fc89315f25f653a7456b9aa24ca9566fca30bb3d65e6348e79958656096b6b864ea8885157d24e55c8d84d6604670219 libshout-2.4.1.tar.gz
+e8478cdbf9a27674c16a7b620d1576f2e31a47262b8e29b314d0f46d4e5be24b9a29790b7b226f48939bc34cacf5734fae0aa5686c7ed5879cdbd827ff8e0339 libshout-2.4.6.tar.gz
=====================================
contrib/src/shout/add-missing-stdlib-stdio.patch
=====================================
@@ -0,0 +1,22 @@
+--- a/src/legacy.c 2022-04-10 12:10:14.000000000 +0200
++++ b/src/legacy.c 2022-09-14 16:16:30.000000000 +0200
+@@ -28,6 +28,8 @@
+ #include "shout_private.h"
+ #include "util.h"
+
++#include <stdlib.h>
++
+ int shout_set_format(shout_t *self, unsigned int format)
+ {
+ if (!self)
+--- a/src/icy.c 2022-04-10 12:10:14.000000000 +0200
++++ b/src/icy.c 2022-09-14 16:19:42.000000000 +0200
+@@ -25,6 +25,8 @@
+
+ #include <stdbool.h>
+ #include <string.h>
++#include <stdlib.h>
++#include <stdio.h>
+
+ #include <shout/shout.h>
+
=====================================
contrib/src/shout/libshout-arpa.patch deleted
=====================================
@@ -1,25 +0,0 @@
-diff -ruN libshout/configure.ac libshout-new/configure.ac
---- libshout/configure.ac 2015-11-20 20:48:32.000000000 +0100
-+++ libshout-new/configure.ac 2015-11-30 18:05:57.123213048 +0100
-@@ -74,7 +74,7 @@
- dnl Checks for header files.
- AC_HEADER_STDC
- AC_HEADER_TIME
--AC_CHECK_HEADERS([strings.h sys/timeb.h])
-+AC_CHECK_HEADERS([strings.h sys/timeb.h arpa/inet.h])
-
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
-diff -ruN libshout/src/proto_roaraudio.c libshout-new/src/proto_roaraudio.c
---- libshout/src/proto_roaraudio.c 2015-11-20 17:22:27.000000000 +0100
-+++ libshout-new/src/proto_roaraudio.c 2015-11-30 18:06:41.823051979 +0100
-@@ -28,7 +28,9 @@
- #endif
-
- /* for htonl(). */
-+#ifdef HAVE_ARPA_INET_H
- #include <arpa/inet.h>
-+#endif
-
- #include <stdio.h>
- #include <stdlib.h>
=====================================
contrib/src/shout/no-examples.patch deleted
=====================================
@@ -1,11 +0,0 @@
---- libshout/Makefile.am.old 2018-11-22 12:46:19.971954640 +0100
-+++ libshout/Makefile.am 2018-11-22 12:46:30.695954599 +0100
-@@ -3,7 +3,7 @@
- AUTOMAKE_OPTIONS = 1.6 foreign
- ACLOCAL_AMFLAGS = -I m4
-
--SUBDIRS = include src examples doc win32
-+SUBDIRS = include src win32
-
- EXTRA_DIST = INSTALL m4/shout.m4 m4/acx_pthread.m4 \
- m4/ogg.m4 m4/vorbis.m4 m4/xiph_compiler.m4 m4/xiph_net.m4 \
=====================================
contrib/src/shout/rules.mak
=====================================
@@ -1,6 +1,6 @@
# shout
-SHOUT_VERSION := 2.4.1
+SHOUT_VERSION := 2.4.6
SHOUT_URL := http://downloads.us.xiph.org/releases/libshout/libshout-$(SHOUT_VERSION).tar.gz
ifdef BUILD_ENCODERS
@@ -8,7 +8,7 @@ ifdef BUILD_NETWORK
PKGS += shout
endif
endif
-ifeq ($(call need_pkg,"shout >= 2.1"),)
+ifeq ($(call need_pkg,"shout >= 2.4.3"),)
PKGS_FOUND += shout
endif
@@ -20,15 +20,14 @@ $(TARBALLS)/libshout-$(SHOUT_VERSION).tar.gz:
# TODO: fix socket stuff on POSIX and Linux
libshout: libshout-$(SHOUT_VERSION).tar.gz .sum-shout
$(UNPACK)
- $(APPLY) $(SRC)/shout/libshout-arpa.patch
$(APPLY) $(SRC)/shout/fix-xiph_openssl.patch
$(APPLY) $(SRC)/shout/shout-strings.patch
$(APPLY) $(SRC)/shout/shout-timeval.patch
$(APPLY) $(SRC)/shout/shout-win32-socklen.patch
- $(APPLY) $(SRC)/shout/no-examples.patch
$(APPLY) $(SRC)/shout/no-force-libwsock.patch
$(APPLY) $(SRC)/shout/should-win32-ws2tcpip.patch
$(APPLY) $(SRC)/shout/win32-gettimeofday.patch
+ $(APPLY) $(SRC)/shout/add-missing-stdlib-stdio.patch
$(call pkg_static,"shout.pc.in")
$(UPDATE_AUTOCONFIG)
$(MOVE)
@@ -36,7 +35,7 @@ libshout: libshout-$(SHOUT_VERSION).tar.gz .sum-shout
DEPS_shout = ogg $(DEPS_ogg) theora $(DEPS_theora) speex $(DEPS_speex)
DEPS_shout += vorbis $(DEPS_vorbis)
-SHOUT_CONF :=
+SHOUT_CONF := --disable-examples --disable-tools
ifdef HAVE_WIN32
SHOUT_CONF += "--disable-thread"
=====================================
contrib/src/shout/shout-strings.patch
=====================================
@@ -10,27 +10,3 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
---- libshout/src/proto_http.c.strings 2015-11-20 17:22:27.000000000 +0100
-+++ libshout/src/proto_http.c 2018-03-29 10:53:02.770498200 +0200
-@@ -28,7 +28,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifdef HAVE_STRINGS_H
- #include <strings.h>
-+#endif
-
- #include <shout/shout.h>
- #include "shout_private.h"
---- libshout/src/shout.c.strings 2015-11-09 12:54:12.000000000 +0100
-+++ libshout/src/shout.c 2018-03-29 10:52:59.169968800 +0200
-@@ -29,7 +29,9 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#ifdef HAVE_STRINGS_H
- #include <strings.h>
-+#endif
- #include <errno.h>
-
- #include <shout/shout.h>
=====================================
modules/access_output/shout.c
=====================================
@@ -208,10 +208,10 @@ static int Open( vlc_object_t *p_this )
|| shout_set_mount( p_shout, url.psz_path ) != SHOUTERR_SUCCESS
|| shout_set_user( p_shout, url.psz_username ) != SHOUTERR_SUCCESS
|| shout_set_agent( p_shout, "VLC media player " VERSION ) != SHOUTERR_SUCCESS
- || shout_set_name( p_shout, psz_name ) != SHOUTERR_SUCCESS
- || shout_set_description( p_shout, psz_description ) != SHOUTERR_SUCCESS
- || shout_set_genre( p_shout, psz_genre ) != SHOUTERR_SUCCESS
- || shout_set_url( p_shout, psz_url ) != SHOUTERR_SUCCESS
+ || shout_set_meta( p_shout, SHOUT_META_NAME, psz_name ) != SHOUTERR_SUCCESS
+ || shout_set_meta( p_shout, SHOUT_META_DESCRIPTION, psz_description ) != SHOUTERR_SUCCESS
+ || shout_set_meta( p_shout, SHOUT_META_GENRE, psz_genre ) != SHOUTERR_SUCCESS
+ || shout_set_meta( p_shout, SHOUT_META_URL, psz_url ) != SHOUTERR_SUCCESS
/* || shout_set_nonblocking( p_shout, 1 ) != SHOUTERR_SUCCESS */
)
{
@@ -230,8 +230,10 @@ static int Open( vlc_object_t *p_this )
free( psz_genre );
free( psz_url );
- i_ret = shout_set_format( p_shout, var_GetBool( p_access, SOUT_CFG_PREFIX "mp3" ) ?
- SHOUT_FORMAT_MP3 : SHOUT_FORMAT_OGG );
+ unsigned format = var_GetBool( p_access, SOUT_CFG_PREFIX "mp3" ) ?
+ SHOUT_FORMAT_MP3 : SHOUT_FORMAT_OGG;
+
+ i_ret = shout_set_content_format( p_shout, format, SHOUT_USAGE_AUDIO, NULL );
if( i_ret != SHOUTERR_SUCCESS )
{
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/838e1ecd476aa34ea2d665f46225ea0d18421239...1acf4ffa60831016054a65296ccfd3b4538c07aa
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/838e1ecd476aa34ea2d665f46225ea0d18421239...1acf4ffa60831016054a65296ccfd3b4538c07aa
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list