Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ezstream for openSUSE:Factory checked in at 2021-04-21 21:00:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ezstream (Old) and /work/SRC/openSUSE:Factory/.ezstream.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ezstream" Wed Apr 21 21:00:26 2021 rev:4 rq:887302 version:1.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ezstream/ezstream.changes 2020-08-17 16:42:01.229830742 +0200 +++ /work/SRC/openSUSE:Factory/.ezstream.new.12324/ezstream.changes 2021-04-21 21:01:13.306373564 +0200 @@ -1,0 +2,7 @@ +Wed Apr 21 18:17:01 UTC 2021 - Ming Li <[email protected]> + +- update to 1.0.2: + * Fix a crash, if metadata placeholders are configured for input files + that do not contain the respective values. From gui-lux on Github (#16). + +------------------------------------------------------------------- Old: ---- ezstream-1.0.1.tar.gz New: ---- ezstream-1.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ezstream.spec ++++++ --- /var/tmp/diff_new_pack.OnTp0M/_old 2021-04-21 21:01:13.762374282 +0200 +++ /var/tmp/diff_new_pack.OnTp0M/_new 2021-04-21 21:01:13.766374288 +0200 @@ -1,7 +1,7 @@ # # spec file for package ezstream # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: ezstream -Version: 1.0.1 +Version: 1.0.2 Release: 0 Summary: Icecast media streaming client License: GPL-2.0-only ++++++ ezstream-1.0.1.tar.gz -> ezstream-1.0.2.tar.gz ++++++ ++++ 2715 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/NEWS new/ezstream-1.0.2/NEWS --- old/ezstream-1.0.1/NEWS 2020-02-22 23:00:01.000000000 +0100 +++ new/ezstream-1.0.2/NEWS 2021-02-11 23:53:43.000000000 +0100 @@ -1,3 +1,15 @@ +Changes in 1.0.2, released on 2021-02-12: + + * Fix a crash, if metadata placeholders are configured for input files + that do not contain the respective values. From gui-lux on Github (#16). + * Fix a crash in one instance of querying the metadata program. From taku0220 + on Github (#23). + * Fix a crash when referencing an unconfigured intake in a stream. From + Optiqus on Github (#28). + * Documentation and example improvements + + + Changes in 1.0.1, released on 2020-02-22: * Fix a crash, if there is a typo in the <encoder /> setting diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/README.md new/ezstream-1.0.2/README.md --- old/ezstream-1.0.1/README.md 2020-02-22 23:00:01.000000000 +0100 +++ new/ezstream-1.0.2/README.md 2021-02-11 16:57:20.000000000 +0100 @@ -127,5 +127,4 @@ - Travis CI: https://travis-ci.org/xiph/ezstream/ - CircleCI: https://circleci.com/gh/xiph/ezstream/ - Codecov: https://codecov.io/gh/xiph/ezstream/ - - Codacy: https://app.codacy.com/manual/mgrimm/ezstream/dashboard - Coverity: https://scan.coverity.com/projects/xiph-ezstream/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/build-aux/compile new/ezstream-1.0.2/build-aux/compile --- old/ezstream-1.0.1/build-aux/compile 2020-02-22 23:23:09.000000000 +0100 +++ new/ezstream-1.0.2/build-aux/compile 2021-02-12 00:24:33.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey <[email protected]>. # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -255,7 +255,8 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/build-aux/missing new/ezstream-1.0.2/build-aux/missing --- old/ezstream-1.0.1/build-aux/missing 2020-02-22 23:23:09.000000000 +0100 +++ new/ezstream-1.0.2/build-aux/missing 2021-02-12 00:24:33.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/configure.ac new/ezstream-1.0.2/configure.ac --- old/ezstream-1.0.1/configure.ac 2020-02-22 23:00:01.000000000 +0100 +++ new/ezstream-1.0.2/configure.ac 2021-02-11 00:52:27.000000000 +0100 @@ -2,7 +2,7 @@ dnl ## SETUP ########################################################### dnl ########### -AC_INIT([ezstream], [1.0.1], [https://gitlab.xiph.org/xiph/ezstream/issues]) +AC_INIT([ezstream], [1.0.2], [https://gitlab.xiph.org/xiph/ezstream/issues]) AC_PREREQ([2.61]) AC_CONFIG_SRCDIR([src/ezstream.c]) AC_CONFIG_AUX_DIR([build-aux]) @@ -99,6 +99,24 @@ AC_C_CONST AC_C_VOLATILE +want_asan="no" +AC_ARG_WITH([asan], + [AS_HELP_STRING([--with-asan=yes], + [build with AddressSanitizer (for debugging) (default: no)])], + [ +case "${withval}" in + no) + ;; + *) + want_asan="yes" + ;; +esac + ] +) +if test x"${want_asan}" = "xyes"; then + AX_UNIQVAR_APPEND([EZ_CFLAGS], [-fsanitize=address -fno-omit-frame-pointer]) + AX_UNIQVAR_APPEND([EZ_LDFLAGS], [-fsanitize=address -fno-omit-frame-pointer]) +fi dnl ############# dnl ## HEADERS ######################################################### @@ -127,7 +145,7 @@ dnl ############### AC_CHECK_LIB([gen], [basename], - [ AX_UNIQVAR_PREPEND([EZ_LIBS], [-lgen]) ]) + [AX_UNIQVAR_PREPEND([EZ_LIBS], [-lgen]) ]) AX_CHECK_LIBSHOUT([], [], [AC_MSG_ERROR([libshout is missing], [1])]) @@ -229,7 +247,8 @@ ${PACKAGE_STRING} has been configured successfully. Configuration: - Charset conversion support .... : ${use_iconv} - Prefix ........................ : ${prefix} + Charset conversion support ......... : ${use_iconv} + Prefix ............................. : ${prefix} + AddressSanitizer (for debugging) ... : ${want_asan} __EOT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/doc/ezstream.1.in.in new/ezstream-1.0.2/doc/ezstream.1.in.in --- old/ezstream-1.0.1/doc/ezstream.1.in.in 2020-02-22 23:00:01.000000000 +0100 +++ new/ezstream-1.0.2/doc/ezstream.1.in.in 2021-02-11 01:36:28.000000000 +0100 @@ -106,10 +106,8 @@ Skips the currently playing track and moves on to the next in playlist mode, or restarts the current track when streaming a single file. .It Cd SIGUSR2 -Triggers rereading of metadata for the stream by running the program or script -specified in -.Li \&<metadata_progname/\&> -.Pq see below. +Triggers rereading of metadata for the stream by running the configured +program or script. This is the only meaningful signal when streaming from standard input. .El .Pp @@ -307,6 +305,10 @@ .Pp The name is case-aware, but not case-sensitive. .Pp +.Em Note: +At this time, only the stream configuration with the default name is +used and must be present. +.Pp Default: .Ar default .It Sy \&<mountpoint\ /\&> @@ -466,7 +468,8 @@ .Xr SCRIPTING for more information. .It Ar stdin -The input is read from standard input. +The input is read from standard input and streamed as-is without any +reencoding. .El .It Sy \&<filename\ /\&> The input media file name; mandatory for all but the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/examples/ezstream-file_template.xml new/ezstream-1.0.2/examples/ezstream-file_template.xml --- old/ezstream-1.0.1/examples/ezstream-file_template.xml 2020-01-29 21:40:14.000000000 +0100 +++ new/ezstream-1.0.2/examples/ezstream-file_template.xml 2021-02-11 00:52:27.000000000 +0100 @@ -51,6 +51,12 @@ <program>flac -s -d --force-raw-format --sign=signed --endian=little -o - @T@</program> <file_ext>.flac</file_ext> </decoder> + + <decoder> + <name>AAC</name> + <program>faad -d -f 2 -w @T@</program> + <file_ext>.m4a</file_ext> + </decoder> </decoders> <encoders> @@ -61,6 +67,12 @@ </encoder> <encoder> + <name>Opus-VBR96</name> + <format>Ogg</format> + <program>opusenc --vbr --bitrate 96 --title @t@ --artist @a@ --raw --raw-rate 44100 - -</program> + </encoder> + + <encoder> <name>Lame-CBR128</name> <format>MP3</format> <program>lame --preset cbr 128 -r -s 44.1 --bitwidth 16 - -</program> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/examples/ezstream-full.xml new/ezstream-1.0.2/examples/ezstream-full.xml --- old/ezstream-1.0.1/examples/ezstream-full.xml 2020-02-22 23:00:01.000000000 +0100 +++ new/ezstream-1.0.2/examples/ezstream-full.xml 2021-02-09 23:27:24.000000000 +0100 @@ -196,6 +196,12 @@ <program>flac -s -d --force-raw-format --sign=signed --endian=little -o - @T@</program> <file_ext>.flac</file_ext> </decoder> + + <decoder> + <name>AAC</name> + <program>faad -d -f 2 -w @T@</program> + <file_ext>.m4a</file_ext> + </decoder> </decoders> <!-- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/m4/libtool.m4 new/ezstream-1.0.2/m4/libtool.m4 --- old/ezstream-1.0.1/m4/libtool.m4 2020-02-22 23:23:08.000000000 +0100 +++ new/ezstream-1.0.2/m4/libtool.m4 2021-02-12 00:24:33.000000000 +0100 @@ -1041,8 +1041,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1492,7 +1492,7 @@ m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -4063,7 +4063,8 @@ if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4703,6 +4704,12 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -6438,7 +6445,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6813,7 +6820,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6878,7 +6885,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7217,7 +7224,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7301,7 +7308,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7312,7 +7319,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/src/ezstream.c new/ezstream-1.0.2/src/ezstream.c --- old/ezstream-1.0.1/src/ezstream.c 2020-02-22 23:22:57.000000000 +0100 +++ new/ezstream-1.0.2/src/ezstream.c 2021-02-11 00:52:27.000000000 +0100 @@ -605,19 +605,18 @@ continue; if (cfg_get_metadata_program()) { char *mdataStr = NULL; - mdata_t prog_md; log_info("running metadata program: %s", cfg_get_metadata_program()); - prog_md = mdata_create(); + md = mdata_create(); if (0 > mdata_run_program(md, cfg_get_metadata_program()) || - 0 > stream_set_metadata(stream, prog_md, &mdataStr)) { - mdata_destroy(&prog_md); + 0 > stream_set_metadata(stream, md, &mdataStr)) { + mdata_destroy(&md); retval = 0; ret = STREAM_DONE; continue; } - mdata_destroy(&prog_md); + mdata_destroy(&md); log_info("new metadata: %s", mdataStr); xfree(mdataStr); } @@ -749,8 +748,10 @@ } main_stream = stream_create(CFG_DEFAULT); - if (0 > stream_configure(main_stream)) + if (0 > stream_configure(main_stream)) { + stream_destroy(&main_stream); return (ez_shutdown(1)); + } cfg_server = stream_get_cfg_server(main_stream); cfg_stream = stream_get_cfg_stream(main_stream); cfg_intake = stream_get_cfg_intake(main_stream); @@ -763,6 +764,7 @@ for (i = 0; i < sizeof(ezstream_signals) / sizeof(int); i++) { if (sigaction(ezstream_signals[i], &act, NULL) == -1) { log_syserr(ERROR, errno, "sigaction"); + stream_destroy(&main_stream); return (ez_shutdown(1)); } } @@ -776,6 +778,7 @@ act.sa_handler = SIG_IGN; if (sigaction(SIGPIPE, &act, NULL) == -1) { log_syserr(ERROR, errno, "sigaction"); + stream_destroy(&main_stream); return (ez_shutdown(1)); } @@ -784,6 +787,7 @@ if (0 > stream_connect(main_stream)) { log_error("initial server connection failed"); + stream_destroy(&main_stream); return (ez_shutdown(1)); } log_notice("connected: %s://%s:%u%s", @@ -815,6 +819,7 @@ } while (cont); stream_disconnect(main_stream); + stream_destroy(&main_stream); if (quit) { if (cfg_get_program_quiet_stderr() && diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/src/mdata.c new/ezstream-1.0.2/src/mdata.c --- old/ezstream-1.0.1/src/mdata.c 2020-02-22 23:00:01.000000000 +0100 +++ new/ezstream-1.0.2/src/mdata.c 2021-02-08 18:36:19.000000000 +0100 @@ -483,15 +483,15 @@ memset(dicts, 0, sizeof(dicts)); dicts[0].from = PLACEHOLDER_ARTIST; - dicts[0].to = mdata_get_artist(md); + dicts[0].to = mdata_get_artist(md) ? mdata_get_artist(md) : ""; dicts[1].from = PLACEHOLDER_ALBUM; - dicts[1].to = mdata_get_album(md); + dicts[1].to = mdata_get_album(md) ? mdata_get_album(md) : ""; dicts[2].from = PLACEHOLDER_TITLE; - dicts[2].to = mdata_get_title(md); + dicts[2].to = mdata_get_title(md) ? mdata_get_title(md) : ""; dicts[3].from = PLACEHOLDER_TRACK; dicts[3].to = mdata_get_filename(md); dicts[4].from = PLACEHOLDER_STRING; - dicts[4].to = mdata_get_songinfo(md); + dicts[4].to = mdata_get_songinfo(md) ? mdata_get_songinfo(md) : ""; str = util_expand_words(format, dicts); ret = (int)strlen(str); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/src/stream.c new/ezstream-1.0.2/src/stream.c --- old/ezstream-1.0.1/src/stream.c 2020-01-29 21:40:14.000000000 +0100 +++ new/ezstream-1.0.2/src/stream.c 2021-02-11 00:52:27.000000000 +0100 @@ -216,7 +216,7 @@ switch (cfg_stream_get_format(cfg_stream)) { case CFG_STREAM_OGG: if (SHOUTERR_SUCCESS != - shout_set_format(s->shout, SHOUT_FORMAT_OGG)) { + shout_set_content_format(s->shout, SHOUT_FORMAT_OGG, 0, NULL)) { log_error("stream: %s: format: %s: %s", s->name, cfg_stream_get_format_str(cfg_stream), shout_get_error(s->shout)); @@ -225,7 +225,7 @@ break; case CFG_STREAM_MP3: if (SHOUTERR_SUCCESS != - shout_set_format(s->shout, SHOUT_FORMAT_MP3)) { + shout_set_content_format(s->shout, SHOUT_FORMAT_MP3, 0, NULL)) { log_error("stream: %s: format: %s: %s", s->name, cfg_stream_get_format_str(cfg_stream), shout_get_error(s->shout)); @@ -234,7 +234,7 @@ break; case CFG_STREAM_WEBM: if (SHOUTERR_SUCCESS != - shout_set_format(s->shout, SHOUT_FORMAT_WEBM)) { + shout_set_content_format(s->shout, SHOUT_FORMAT_WEBM, 0, NULL)) { log_error("stream: %s: format: %s: %s", s->name, cfg_stream_get_format_str(cfg_stream), shout_get_error(s->shout)); @@ -244,7 +244,7 @@ #ifdef SHOUT_FORMAT_MATROSKA case CFG_STREAM_MATROSKA: if (SHOUTERR_SUCCESS != - shout_set_format(s->shout, SHOUT_FORMAT_MATROSKA)) { + shout_set_content_format(s->shout, SHOUT_FORMAT_MATROSKA, 0, NULL)) { log_error("stream: %s: format: %s: %s", s->name, cfg_stream_get_format_str(cfg_stream), shout_get_error(s->shout)); @@ -265,28 +265,28 @@ } if (cfg_stream_get_stream_name(cfg_stream) && SHOUTERR_SUCCESS != - shout_set_name(s->shout, cfg_stream_get_stream_name(cfg_stream))) { + shout_set_meta(s->shout, SHOUT_META_NAME, cfg_stream_get_stream_name(cfg_stream))) { log_error("stream: %s: name: %s", s->name, shout_get_error(s->shout)); return (-1); } if (cfg_stream_get_stream_url(cfg_stream) && SHOUTERR_SUCCESS != - shout_set_url(s->shout, cfg_stream_get_stream_url(cfg_stream))) { + shout_set_meta(s->shout, SHOUT_META_URL, cfg_stream_get_stream_url(cfg_stream))) { log_error("stream: %s: url: %s", s->name, shout_get_error(s->shout)); return (-1); } if (cfg_stream_get_stream_genre(cfg_stream) && SHOUTERR_SUCCESS != - shout_set_genre(s->shout, cfg_stream_get_stream_genre(cfg_stream))) { + shout_set_meta(s->shout, SHOUT_META_GENRE, cfg_stream_get_stream_genre(cfg_stream))) { log_error("stream: %s: genre: %s", s->name, shout_get_error(s->shout)); return (-1); } if (cfg_stream_get_stream_description(cfg_stream) && SHOUTERR_SUCCESS != - shout_set_description(s->shout, cfg_stream_get_stream_description(cfg_stream))) { + shout_set_meta(s->shout, SHOUT_META_DESCRIPTION, cfg_stream_get_stream_description(cfg_stream))) { log_error("stream: %s: description: %s", s->name, shout_get_error(s->shout)); return (-1); @@ -383,6 +383,7 @@ cfg_server_list_t servers; cfg_stream_t cfg_stream; cfg_server_t cfg_server; + cfg_intake_t cfg_intake; const char *server; streams = cfg_get_streams(); @@ -408,6 +409,14 @@ _stream_reset(s); return (-1); } + + cfg_intake = stream_get_cfg_intake(s); + if (0 > cfg_intake_validate(cfg_intake, NULL)) { + log_error("stream: %s: referencing unconfigured intake (%s)", + s->name, cfg_intake_get_name(cfg_intake)); + _stream_reset(s); + return (-1); + } return (0); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/tests/check_mdata.c new/ezstream-1.0.2/tests/check_mdata.c --- old/ezstream-1.0.1/tests/check_mdata.c 2020-02-22 23:00:01.000000000 +0100 +++ new/ezstream-1.0.2/tests/check_mdata.c 2021-02-08 18:36:19.000000000 +0100 @@ -147,15 +147,38 @@ int ret; ck_assert_int_eq(mdata_parse_file(md, SRCDIR "/test01-artist+album+title.ogg"), 0); - - ck_assert_int_lt(mdata_strformat(md, buf, sizeof(buf), NULL), 0); - ret = mdata_strformat(md, buf, sizeof(buf), "@a@/@b@/@t@/@T@/@s@"); ck_assert_int_eq(ret, (int)strlen(buf)); ck_assert_str_eq(buf, "test artist/test album/test title" "/" SRCDIR "/test01-artist+album+title.ogg" "/test artist - test title - test album"); + + ck_assert_int_eq(mdata_parse_file(md, SRCDIR "/test12-artist.ogg"), 0); + ret = mdata_strformat(md, buf, sizeof(buf), "@a@/@b@/@t@/@T@/@s@"); + ck_assert_int_eq(ret, (int)strlen(buf)); + ck_assert_str_eq(buf, + "test artist//" + "/" SRCDIR "/test12-artist.ogg" + "/test artist"); + + ck_assert_int_eq(mdata_parse_file(md, SRCDIR "/test15-title.ogg"), 0); + ret = mdata_strformat(md, buf, sizeof(buf), "@a@/@b@/@t@/@T@/@s@"); + ck_assert_int_eq(ret, (int)strlen(buf)); + ck_assert_str_eq(buf, + "//test title" + "/" SRCDIR "/test15-title.ogg" + "/test title"); + + ck_assert_int_eq(mdata_parse_file(md, SRCDIR "/test16-nometa.ogg"), 0); + ret = mdata_strformat(md, buf, sizeof(buf), "@a@/@b@/@t@/@T@/@s@"); + ck_assert_int_eq(ret, (int)strlen(buf)); + ck_assert_str_eq(buf, + "//" + "/" SRCDIR "/test16-nometa.ogg" + "/"); + + ck_assert_int_lt(mdata_strformat(md, buf, sizeof(buf), NULL), 0); } END_TEST diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/ezstream-1.0.1/tests/check_stream.c new/ezstream-1.0.2/tests/check_stream.c --- old/ezstream-1.0.1/tests/check_stream.c 2020-01-29 21:40:14.000000000 +0100 +++ new/ezstream-1.0.2/tests/check_stream.c 2021-02-11 00:52:27.000000000 +0100 @@ -10,6 +10,8 @@ void setup_checked(void); void teardown_checked(void); +cfg_intake_list_t intakes; + START_TEST(test_stream) { stream_t s; @@ -17,6 +19,7 @@ char *m_str; cfg_server_t srv_cfg; cfg_stream_t str_cfg; + cfg_intake_t int_cfg; cfg_server_list_t servers = cfg_get_servers(); cfg_stream_list_t streams = cfg_get_streams(); @@ -32,7 +35,8 @@ ck_assert_ptr_ne(srv_cfg, NULL); str_cfg = stream_get_cfg_stream(s); ck_assert_ptr_ne(str_cfg, NULL); - ck_assert_ptr_ne(stream_get_cfg_intake(s), NULL); + int_cfg = stream_get_cfg_intake(s); + ck_assert_ptr_ne(int_cfg, NULL); ck_assert_int_ne(stream_configure(s), 0); ck_assert_int_eq(cfg_server_set_hostname(srv_cfg, servers, "localhost", NULL), 0); @@ -48,8 +52,17 @@ ck_assert_int_eq(cfg_stream_set_mountpoint(str_cfg, streams, "/test.ogg", NULL), 0); ck_assert_int_ne(stream_configure(s), 0); ck_assert_int_eq(cfg_stream_set_format(str_cfg, streams, "mp3", NULL), 0); - ck_assert_int_eq(stream_configure(s), 0); + log_error("MP3 stream configuration result: %d (may be due to libshout config)", + stream_configure(s)); + ck_assert_int_eq(cfg_stream_set_format(str_cfg, streams, "webm", NULL), 0); + log_error("WebM stream configuration result: %d (may be due to libshout config)", + stream_configure(s)); + ck_assert_int_eq(cfg_stream_set_format(str_cfg, streams, "matroska", NULL), 0); + log_error("Matroska stream configuration result: %d (may be due to libshout config)", + stream_configure(s)); ck_assert_int_eq(cfg_stream_set_format(str_cfg, streams, "ogg", NULL), 0); + ck_assert_int_ne(stream_configure(s), 0); + cfg_intake_set_filename(int_cfg, intakes, "stream_test", NULL); ck_assert_int_eq(stream_configure(s), 0); ck_assert_int_eq(cfg_stream_set_stream_name(str_cfg, streams, "test", NULL), 0); ck_assert_int_eq(cfg_stream_set_stream_url(str_cfg, streams, "test", NULL), 0);
