diff -Nru mpg123-1.25.6/configure mpg123-1.25.8/configure --- mpg123-1.25.6/configure 2017-08-11 07:30:00.000000000 +0000 +++ mpg123-1.25.8/configure 2017-11-30 08:12:33.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for mpg123 1.25.6. +# Generated by GNU Autoconf 2.69 for mpg123 1.25.8. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='mpg123' PACKAGE_TARNAME='mpg123' -PACKAGE_VERSION='1.25.6' -PACKAGE_STRING='mpg123 1.25.6' +PACKAGE_VERSION='1.25.8' +PACKAGE_STRING='mpg123 1.25.8' PACKAGE_BUGREPORT='maintainer@mpg123.org' PACKAGE_URL='' @@ -1567,7 +1567,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures mpg123 1.25.6 to adapt to many kinds of systems. +\`configure' configures mpg123 1.25.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1637,7 +1637,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mpg123 1.25.6:";; + short | recursive ) echo "Configuration of mpg123 1.25.8:";; esac cat <<\_ACEOF @@ -1863,7 +1863,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -mpg123 configure 1.25.6 +mpg123 configure 1.25.8 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2469,7 +2469,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by mpg123 $as_me 1.25.6, which was +It was created by mpg123 $as_me 1.25.8, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2822,7 +2822,7 @@ API_VERSION=44 -LIB_PATCHLEVEL=5 +LIB_PATCHLEVEL=7 OUTAPI_VERSION=2 OUTLIB_PATCHLEVEL=1 @@ -3425,7 +3425,7 @@ # Define the identity of the package. PACKAGE='mpg123' - VERSION='1.25.6' + VERSION='1.25.8' cat >>confdefs.h <<_ACEOF @@ -20241,7 +20241,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mpg123 $as_me 1.25.6, which was +This file was extended by mpg123 $as_me 1.25.8, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -20307,7 +20307,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -mpg123 config.status 1.25.6 +mpg123 config.status 1.25.8 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru mpg123-1.25.6/configure.ac mpg123-1.25.8/configure.ac --- mpg123-1.25.6/configure.ac 2017-08-11 07:29:23.000000000 +0000 +++ mpg123-1.25.8/configure.ac 2017-11-30 08:11:45.000000000 +0000 @@ -8,12 +8,12 @@ AC_PREREQ(2.57) dnl ############# Initialisation -AC_INIT([mpg123], [1.25.6], [maintainer@mpg123.org]) +AC_INIT([mpg123], [1.25.8], [maintainer@mpg123.org]) dnl Increment API_VERSION when the API gets changes (new functions). dnl libmpg123 API_VERSION=44 -LIB_PATCHLEVEL=5 +LIB_PATCHLEVEL=7 dnl libout123 OUTAPI_VERSION=2 diff -Nru mpg123-1.25.6/debian/changelog mpg123-1.25.8/debian/changelog --- mpg123-1.25.6/debian/changelog 2017-08-26 18:54:54.000000000 +0000 +++ mpg123-1.25.8/debian/changelog 2017-12-13 15:44:01.000000000 +0000 @@ -1,8 +1,28 @@ -mpg123 (1.25.6-1~ubuntu16.04.1~ppa1) xenial; urgency=medium +mpg123 (1.25.8-1~ubuntu16.04.1~ppa1) xenial; urgency=medium * No-change backport to xenial - -- Gianfranco Costamagna Sat, 26 Aug 2017 20:54:54 +0200 + -- Gianfranco Costamagna Wed, 13 Dec 2017 16:44:01 +0100 + +mpg123 (1.25.8-1) unstable; urgency=medium + + * Team upload. + * New upstream release. + * debian/control: Bump Standards-Version. + + -- Sebastian Ramacher Sun, 03 Dec 2017 21:31:49 +0100 + +mpg123 (1.25.7-1) unstable; urgency=medium + + * Team upload. + * New upstream release. + - Do not play with cursor and inverse video for progress bar when + TERM=dumb. (Closes: #872362) + - Fix parsing of host port for numerical IPv6 addresses. (Closes: #872361) + * debian/control: Bump Standards-Version. + * debian/mpg123.manpages: Removed, not needed. + + -- Sebastian Ramacher Tue, 26 Sep 2017 16:12:35 +0200 mpg123 (1.25.6-1) unstable; urgency=medium diff -Nru mpg123-1.25.6/debian/control mpg123-1.25.8/debian/control --- mpg123-1.25.6/debian/control 2017-08-06 15:47:06.000000000 +0000 +++ mpg123-1.25.8/debian/control 2017-12-03 20:28:16.000000000 +0000 @@ -15,7 +15,7 @@ libpulse-dev [!hurd-i386], pkg-config, portaudio19-dev -Standards-Version: 4.0.1 +Standards-Version: 4.1.2 Homepage: http://mpg123.org/ Vcs-Git: https://anonscm.debian.org/cgit/pkg-multimedia/mpg123.git Vcs-Browser: https://anonscm.debian.org/cgit/pkg-multimedia/mpg123.git diff -Nru mpg123-1.25.6/debian/mpg123.install mpg123-1.25.8/debian/mpg123.install --- mpg123-1.25.6/debian/mpg123.install 2016-09-28 16:43:08.000000000 +0000 +++ mpg123-1.25.8/debian/mpg123.install 2017-09-26 14:07:51.000000000 +0000 @@ -1,3 +1,3 @@ -debian/tmp/usr/bin/* -debian/tmp/usr/lib/*/mpg123/*.so -debian/tmp/usr/share/man/*/* +usr/bin/* +usr/lib/*/mpg123/*.so +usr/share/man/*/* diff -Nru mpg123-1.25.6/debian/mpg123.manpages mpg123-1.25.8/debian/mpg123.manpages --- mpg123-1.25.6/debian/mpg123.manpages 2016-09-28 16:43:08.000000000 +0000 +++ mpg123-1.25.8/debian/mpg123.manpages 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/share/man/*/* diff -Nru mpg123-1.25.6/mpg123.spec mpg123-1.25.8/mpg123.spec --- mpg123-1.25.6/mpg123.spec 2017-08-11 07:30:13.000000000 +0000 +++ mpg123-1.25.8/mpg123.spec 2017-11-30 08:15:46.000000000 +0000 @@ -3,7 +3,7 @@ # - devel packages for alsa, sdl, etc... to build the respective output modules. Summary: The fast console mpeg audio decoder/player. Name: mpg123 -Version: 1.25.6 +Version: 1.25.8 Release: 1 URL: http://www.mpg123.org/ License: GPL diff -Nru mpg123-1.25.6/NEWS mpg123-1.25.8/NEWS --- mpg123-1.25.6/NEWS 2017-08-11 07:29:15.000000000 +0000 +++ mpg123-1.25.8/NEWS 2017-11-30 08:11:32.000000000 +0000 @@ -1,3 +1,30 @@ +1.25.8 +------ +- mpg123: +-- Also disable cursor/video games for empty TERM (not just unset and dumb). +- libmpg123: +-- Accept changing mode extension bits when looking for next header for + detecting free-format streams (bug 257). +-- Fix compute_bpf() for free format streams (needed to estimate track + length and working fuzzy seeking in absence of an Info tag). + +1.25.7 +------ +- mpg123: +-- Do not play with cursor and inverse video for progress bar + when TERM=dumb. +-- Fix parsing of host port for numerical IPv6 addresses (just did + not work before, only for textual host names). +- libmpg123: +-- Proper fix for the xrpnt overflow problems by correctly + initialising certain tables for MPEG 2.x layer III. The checks that + catch the resulting overflow are still in place, but likely superfluous + now. Note that this means certain valid files would have been misdecoded + before, if anyone actually produced them. Thanks to Robert Hegemann for + the fix! +-- Silently handle granules with part2_3_length == 0, but + scalefac_compress != 0 (ignore the latter). + 1.25.6 ------ - Hotfix for bug 255: Overflow reading frame data bits in layer II decoding. diff -Nru mpg123-1.25.6/src/common.c mpg123-1.25.8/src/common.c --- mpg123-1.25.6/src/common.c 2017-08-11 07:28:58.000000000 +0000 +++ mpg123-1.25.8/src/common.c 2017-11-30 08:06:56.000000000 +0000 @@ -29,6 +29,29 @@ int stopped = 0; int paused = 0; +static int term_is_fun = -1; + +int term_have_fun(int fd) +{ + if(term_is_fun > -1) + return term_is_fun; + else + term_is_fun = 0; +#ifdef HAVE_TERMIOS + if(term_width(fd) > 0 && param.term_visual) + { + /* Only play with non-dumb terminals. */ + char *tname = compat_getenv("TERM"); + if(tname) + { + if(strcmp(tname, "") && strcmp(tname, "dumb")) + term_is_fun = 1; + free(tname); + } + } +#endif + return term_is_fun; +} /* Also serves as a way to detect if we have an interactive terminal. */ int term_width(int fd) @@ -382,6 +405,7 @@ if(maxlen > 0) memset(line+len, ' ', linelen-len); #ifdef HAVE_TERMIOS + draw_bar = draw_bar && term_have_fun(STDERR_FILENO); /* Use inverse color to draw a progress bar. */ if(maxlen > 0 && draw_bar) { diff -Nru mpg123-1.25.6/src/common.h mpg123-1.25.8/src/common.h --- mpg123-1.25.6/src/common.h 2017-08-11 07:28:58.000000000 +0000 +++ mpg123-1.25.8/src/common.h 2017-11-30 07:55:41.000000000 +0000 @@ -15,6 +15,9 @@ extern int stopped; extern int paused; +/* Return non-zero if full terminal fun is desired/possible. */ +int term_have_fun(int fd); + /* Return width of terminal associated with given descriptor, -1 when there is none. */ int term_width(int fd); diff -Nru mpg123-1.25.6/src/libmpg123/getbits.h mpg123-1.25.8/src/libmpg123/getbits.h --- mpg123-1.25.6/src/libmpg123/getbits.h 2017-08-11 07:29:15.000000000 +0000 +++ mpg123-1.25.8/src/libmpg123/getbits.h 2017-11-30 07:55:41.000000000 +0000 @@ -45,6 +45,7 @@ fprintf(stderr,"g%d",number_of_bits); #endif /* Safety catch until we got the nasty code fully figured out. */ + /* No, that catch stays here, even if we think we got it figured out! */ if( (long)(fr->wordpointer-fr->bsbuf)*8 + fr->bitindex+number_of_bits > (long)fr->framesize*8 ) return 0; diff -Nru mpg123-1.25.6/src/libmpg123/layer3.c mpg123-1.25.8/src/libmpg123/layer3.c --- mpg123-1.25.6/src/libmpg123/layer3.c 2017-08-11 07:28:59.000000000 +0000 +++ mpg123-1.25.8/src/libmpg123/layer3.c 2017-11-30 07:55:41.000000000 +0000 @@ -280,10 +280,12 @@ int *mp; int cb,lwin; const unsigned char *bdf; + int switch_idx; mp = map[j][0] = mapbuf0[j]; bdf = bi->longDiff; - for(i=0,cb = 0; cb < 8 ; cb++,i+=*bdf++) + switch_idx = (j < 3) ? 8 : 6; + for(i=0,cb = 0; cb < switch_idx ; cb++,i+=*bdf++) { *mp++ = (*bdf) >> 1; *mp++ = i; @@ -465,8 +467,14 @@ } gr_info->pow2gain = fr->gainpow2+256 - getbits_fast(fr, 8) + powdiff; if(ms_stereo) gr_info->pow2gain += 2; - gr_info->scalefac_compress = getbits(fr, tab[4]); + if(gr_info->part2_3_length == 0) + { + if(gr_info->scalefac_compress > 0) + debug1( "scalefac_compress _should_ be zero instead of %i" + , gr_info->scalefac_compress ); + gr_info->scalefac_compress = 0; + } if(get1bit(fr)) { /* window switch flag */ @@ -553,6 +561,14 @@ int num0 = slen[0][gr_info->scalefac_compress]; int num1 = slen[1][gr_info->scalefac_compress]; + if(gr_info->part2_3_length == 0) + { + int i; + for(i=0;i<39;i++) + *scf++ = 0; + return 0; + } + if(gr_info->block_type == 2) { int i=18; @@ -667,6 +683,14 @@ pnt = stab[n][(slen>>12)&0x7]; + if(gr_info->part2_3_length == 0) + { + int i; + for(i=0;i<39;i++) + *scf++ = 0; + return 0; + } + for(i=0;i<4;i++) { int num = slen & 0x7; @@ -680,7 +704,7 @@ else for(j=0;j<(int)(pnt[i]);j++) *scf++ = 0; } - + n = (n << 1) + 1; for(i=0;ipart2_3_length > 0) + { + /* mhipp tree has this split up a bit... */ int num=getbitoffset(fr); MASK_TYPE mask; @@ -1197,6 +1227,18 @@ backbits(fr, num); num = 0; + } + else + { + part2remain = 0; + /* Not entirely sure what good values are, must be > 0. */ + gr_info->maxband[0] = + gr_info->maxband[1] = + gr_info->maxband[2] = + gr_info->maxbandl = 0; + gr_info->maxb = 1; + } + while(xrpnt < &xr[SBLIMIT][0]) *xrpnt++ = DOUBLE_TO_REAL(0.0); diff -Nru mpg123-1.25.6/src/libmpg123/mpeghead.h mpg123-1.25.8/src/libmpg123/mpeghead.h --- mpg123-1.25.6/src/libmpg123/mpeghead.h 2017-08-11 07:28:59.000000000 +0000 +++ mpg123-1.25.8/src/libmpg123/mpeghead.h 2017-11-30 08:08:52.000000000 +0000 @@ -78,7 +78,7 @@ #define HDR_CMPMASK (HDR_SYNC|HDR_VERSION|HDR_LAYER|HDR_SAMPLERATE) /* A stricter mask, for matching free format headers. */ -#define HDR_SAMEMASK (HDR_SYNC|HDR_VERSION|HDR_LAYER|HDR_BITRATE|HDR_SAMPLERATE|HDR_CHANNEL|HDR_CHANEX) +#define HDR_SAMEMASK (HDR_SYNC|HDR_VERSION|HDR_LAYER|HDR_BITRATE|HDR_SAMPLERATE|HDR_CHANNEL) /* Free format headers have zero bitrate value. */ #define HDR_FREE_FORMAT(head) (!(head & HDR_BITRATE)) diff -Nru mpg123-1.25.6/src/libmpg123/parse.c mpg123-1.25.8/src/libmpg123/parse.c --- mpg123-1.25.6/src/libmpg123/parse.c 2017-08-11 07:28:59.000000000 +0000 +++ mpg123-1.25.8/src/libmpg123/parse.c 2017-11-30 08:10:25.000000000 +0000 @@ -889,26 +889,7 @@ double compute_bpf(mpg123_handle *fr) { - double bpf; - - switch(fr->lay) - { - case 1: - bpf = tabsel_123[fr->lsf][0][fr->bitrate_index]; - bpf *= 12000.0 * 4.0; - bpf /= freqs[fr->sampling_frequency] <<(fr->lsf); - break; - case 2: - case 3: - bpf = tabsel_123[fr->lsf][fr->lay-1][fr->bitrate_index]; - bpf *= 144000; - bpf /= freqs[fr->sampling_frequency] << (fr->lsf); - break; - default: - bpf = 1.0; - } - - return bpf; + return (fr->framesize > 0) ? fr->framesize + 4.0 : 1.0; } int attribute_align_arg mpg123_spf(mpg123_handle *mh) diff -Nru mpg123-1.25.6/src/mpg123app.h mpg123-1.25.8/src/mpg123app.h --- mpg123-1.25.6/src/mpg123app.h 2017-08-11 07:28:59.000000000 +0000 +++ mpg123-1.25.8/src/mpg123app.h 2017-11-30 07:55:41.000000000 +0000 @@ -57,6 +57,7 @@ long output_flags; /* out123 flags */ #ifdef HAVE_TERMIOS int term_ctrl; + int term_visual; /* Those are supposed to be single characters. */ char* term_usr1; char* term_usr2; diff -Nru mpg123-1.25.6/src/mpg123.c mpg123-1.25.8/src/mpg123.c --- mpg123-1.25.6/src/mpg123.c 2017-08-11 07:28:59.000000000 +0000 +++ mpg123-1.25.8/src/mpg123.c 2017-11-30 07:55:41.000000000 +0000 @@ -64,7 +64,8 @@ NULL, /* output device */ 0, /* destination (headphones, ...) */ #ifdef HAVE_TERMIOS - FALSE , /* term control */ + FALSE, /* term control */ + TRUE, /* term visuals */ MPG123_TERM_USR1, MPG123_TERM_USR2, #endif diff -Nru mpg123-1.25.6/src/resolver.c mpg123-1.25.8/src/resolver.c --- mpg123-1.25.6/src/resolver.c 2017-08-11 07:28:58.000000000 +0000 +++ mpg123-1.25.8/src/resolver.c 2017-11-30 07:55:41.000000000 +0000 @@ -42,6 +42,9 @@ { size_t pos = 0; /* current position in input URL */ size_t pos2 = 0; /* another position in input URL */ +#ifdef IPV6 + size_t pos3 = 0; /* yet another (for IPv6 port) */ +#endif char *part = NULL; /* a part of url we work on */ int ret = TRUE; /* return code */ /* Zeroing the output strings; not freeing to avoid unnecessary mallocs. */ @@ -92,16 +95,22 @@ if( (part = strchr(url->p+pos,']')) != NULL) { pos2 = part-url->p; + pos3 = pos2+1; /* : after ] */ } else { error("Malformed IPv6 URL!"); return FALSE; } } else + { #endif for(pos2=pos; pos2 < url->fill-1; ++pos2) { char a = url->p[pos2]; if( a == ':' || a == '/') break; } +#ifdef IPV6 + pos3 = pos2; + } +#endif /* At pos2 there is now either a delimiter or the end. */ debug4("hostname between %lu and %lu, %lu chars of %s", (unsigned long)pos, (unsigned long)pos2, (unsigned long)(pos2-pos), url->p + pos); if(host != NULL && !mpg123_set_substring(host, url->p, pos, pos2-pos)) @@ -109,7 +118,11 @@ error("Cannot set host string (out of mem?)."); return FALSE; } +#ifdef IPV6 + pos = pos3; /* Look after ], if present. */ +#else pos = pos2; +#endif /* Now for the port... */ if(url->p[pos] == ':') diff -Nru mpg123-1.25.6/src/term.c mpg123-1.25.8/src/term.c --- mpg123-1.25.6/src/term.c 2017-08-11 07:28:59.000000000 +0000 +++ mpg123-1.25.8/src/term.c 2017-11-30 07:55:41.000000000 +0000 @@ -109,7 +109,7 @@ const char hide_cursor[] = "\x1b[?25l"; debug("term_init"); - if(term_width(STDERR_FILENO) >= 0) + if(term_have_fun(STDERR_FILENO)) write(STDERR_FILENO, hide_cursor, sizeof(hide_cursor)); debug1("param.term_ctrl: %i", param.term_ctrl); @@ -550,7 +550,7 @@ { const char cursor_restore[] = "\x1b[?25h"; /* Bring cursor back. */ - if(term_width(STDERR_FILENO) >= 0) + if(term_have_fun(STDERR_FILENO)) write(STDERR_FILENO, cursor_restore, sizeof(cursor_restore)); if(!term_enable) return;