pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/mpg123 Improve error handling for broken input s...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b82a16e2208e
branches: trunk
changeset: 546087:b82a16e2208e
user: martin <martin%pkgsrc.org@localhost>
date: Wed Aug 20 22:17:30 2008 +0000
description:
Improve error handling for broken input streams and make the backend deal
with a dying frontend. Fixes PR pkg/39378.
diffstat:
audio/mpg123/distinfo | 6 +-
audio/mpg123/patches/patch-ai | 94 +++++++++++++++++++++++++-----------------
audio/mpg123/patches/patch-av | 22 ++++++++-
3 files changed, 78 insertions(+), 44 deletions(-)
diffs (truncated from 407 to 300 lines):
diff -r 863deac891a9 -r b82a16e2208e audio/mpg123/distinfo
--- a/audio/mpg123/distinfo Wed Aug 20 22:13:52 2008 +0000
+++ b/audio/mpg123/distinfo Wed Aug 20 22:17:30 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.28 2008/05/20 18:36:47 tnn Exp $
+$NetBSD: distinfo,v 1.29 2008/08/20 22:17:30 martin Exp $
SHA1 (mpg123/mpg123-0.59r.tar.gz) = c32fe242f4506d218bd19a51a4034da9fdc79493
RMD160 (mpg123/mpg123-0.59r.tar.gz) = 17d47ca04fdcac5e2d71f95ccbd23b61b5ed8b3c
@@ -14,7 +14,7 @@
SHA1 (patch-af) = 309075bc6fd4b689b711f0ae84f2e5c829609452
SHA1 (patch-ag) = c27b6a441573939dc23268a6937905d038d6a66b
SHA1 (patch-ah) = e1419bc6d25360d0825041028b6b3f485bcf5f43
-SHA1 (patch-ai) = eff8d2d5602056a052855dc81046642779a61272
+SHA1 (patch-ai) = da7debed75a978d096e9f27a157635692a8cd918
SHA1 (patch-aj) = b828a5e35a03b307d46cd07356624d19b9d56777
SHA1 (patch-ak) = b30898cff26859eca0d23ea8cfdd461920b978a8
SHA1 (patch-al) = 88dec640d40e6a3f1828096a4ff7b5a4dbd0a222
@@ -27,5 +27,5 @@
SHA1 (patch-as) = 8765b22c556cdc217f6270f3a5e70b40b36b9229
SHA1 (patch-at) = 9a64a62f7d1d115e3d36dbb0f08762d4b0eb1e2b
SHA1 (patch-au) = 02c480cbb6ff8ab904be93eaf319b43f4f02d588
-SHA1 (patch-av) = 9c25c4a82042ca862409284fb2616a613485ff76
+SHA1 (patch-av) = 4c771cd77091af3e5ade356d7e7230ee4ae1efc0
SHA1 (patch-aw) = ba937829caf7f3ca042dca87f5b3f83a0cf2611a
diff -r 863deac891a9 -r b82a16e2208e audio/mpg123/patches/patch-ai
--- a/audio/mpg123/patches/patch-ai Wed Aug 20 22:13:52 2008 +0000
+++ b/audio/mpg123/patches/patch-ai Wed Aug 20 22:17:30 2008 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ai,v 1.4 2006/05/26 12:16:13 drochner Exp $
+$NetBSD: patch-ai,v 1.5 2008/08/20 22:17:30 martin Exp $
--- layer3.c.orig 1999-04-21 17:25:18.000000000 +0200
-+++ layer3.c
-@@ -109,54 +109,54 @@ void init_layer3(int down_sample_sblimit
++++ layer3.c 2008-08-20 15:48:42.000000000 +0200
+@@ -109,54 +109,54 @@
int i,j,k,l;
for(i=-256;i<118+4;i++)
@@ -81,7 +81,7 @@
}
for(j=0;j<4;j++) {
-@@ -169,10 +169,10 @@ void init_layer3(int down_sample_sblimit
+@@ -169,10 +169,10 @@
for(i=0;i<16;i++) {
double t = tan( (double) i * M_PI / 12.0 );
@@ -96,7 +96,7 @@
for(j=0;j<2;j++) {
double base = pow(2.0,-0.25*(j+1.0));
-@@ -183,10 +183,10 @@ void init_layer3(int down_sample_sblimit
+@@ -183,10 +183,10 @@
else
p2 = pow(base,i*0.5);
}
@@ -111,7 +111,25 @@
}
}
-@@ -608,7 +608,7 @@ static int pretab2[22] = {0,0,0,0,0,0,0,
+@@ -354,7 +354,7 @@
+
+ if(gr_info->block_type == 0) {
+ fprintf(stderr,"Blocktype == 0 and window-switching == 1 not allowed.\n");
+- exit(1);
++ return;
+ }
+
+ /* region_count/start parameters are implicit in this case. */
+@@ -434,7 +434,7 @@
+
+ if(gr_info->block_type == 0) {
+ fprintf(stderr,"Blocktype == 0 and window-switching == 1 not allowed.\n");
+- exit(1);
++ return;
+ }
+ /* region_count/start parameters are implicit in this case. */
+ /* check this again! */
+@@ -608,7 +608,7 @@
* Dequantize samples (includes huffman decoding)
*/
/* 24 is enough because tab13 has max. a 19 bit huffvector */
@@ -120,7 +138,7 @@
#define REFRESH_MASK \
while(num < BITSHIFT) { \
mask |= getbyte()<<(BITSHIFT-num); \
-@@ -625,7 +625,7 @@ static int III_dequantize_sample(real xr
+@@ -625,7 +625,7 @@
int *me;
int num=getbitoffset();
@@ -129,7 +147,7 @@
part2remain -= num;
{
-@@ -709,50 +709,50 @@ static int III_dequantize_sample(real xr
+@@ -709,50 +709,50 @@
if(x == 15 && h->linbits) {
max[lwin] = cb;
REFRESH_MASK;
@@ -192,7 +210,7 @@
xrpnt += step;
}
}
-@@ -804,7 +804,7 @@ static int III_dequantize_sample(real xr
+@@ -804,7 +804,7 @@
mask <<= 1;
}
else
@@ -201,7 +219,7 @@
xrpnt += step;
}
}
-@@ -812,8 +812,8 @@ static int III_dequantize_sample(real xr
+@@ -812,8 +812,8 @@
if(lwin < 3) { /* short band? */
while(1) {
for(;mc > 0;mc--) {
@@ -212,7 +230,7 @@
}
if(m >= me)
break;
-@@ -883,50 +883,50 @@ static int III_dequantize_sample(real xr
+@@ -883,50 +883,50 @@
if (x == 15 && h->linbits) {
max = cb;
REFRESH_MASK;
@@ -275,7 +293,7 @@
}
}
-@@ -974,7 +974,7 @@ static int III_dequantize_sample(real xr
+@@ -974,7 +974,7 @@
mask <<= 1;
}
else
@@ -284,7 +302,7 @@
}
}
-@@ -987,7 +987,7 @@ static int III_dequantize_sample(real xr
+@@ -987,7 +987,7 @@
num = 0;
while(xrpnt < &xr[SBLIMIT][0])
@@ -293,7 +311,7 @@
while( part2remain > 16 ) {
getbits(16); /* Dismiss stuffing Bits */
-@@ -1065,8 +1065,8 @@ static void III_i_stereo(real xr_buf[2][
+@@ -1065,8 +1065,8 @@
t1 = tab1[is_p]; t2 = tab2[is_p];
for (; sb > 0; sb--,idx+=3) {
real v = xr[0][idx];
@@ -304,7 +322,7 @@
}
}
}
-@@ -1087,8 +1087,8 @@ maybe still wrong??? (copy 12 to 13?) */
+@@ -1087,8 +1087,8 @@
t1 = tab1[is_p]; t2 = tab2[is_p];
for ( ; sb > 0; sb--,idx+=3 ) {
real v = xr[0][idx];
@@ -315,7 +333,7 @@
}
}
} /* end for(lwin; .. ; . ) */
-@@ -1108,8 +1108,8 @@ maybe still wrong??? (copy 12 to 13?) */
+@@ -1108,8 +1108,8 @@
t1 = tab1[is_p]; t2 = tab2[is_p];
for ( ; sb > 0; sb--,idx++) {
real v = xr[0][idx];
@@ -326,7 +344,7 @@
}
}
else
-@@ -1119,7 +1119,10 @@ maybe still wrong??? (copy 12 to 13?) */
+@@ -1119,7 +1119,10 @@
}
else { /* ((gr_info->block_type != 2)) */
int sfb = gr_info->maxbandl;
@@ -338,7 +356,7 @@
for ( ; sfb<21; sfb++) {
int sb = bi->longDiff[sfb];
is_p = scalefac[sfb]; /* scale: 0-15 */
-@@ -1128,8 +1131,8 @@ maybe still wrong??? (copy 12 to 13?) */
+@@ -1128,8 +1131,8 @@
t1 = tab1[is_p]; t2 = tab2[is_p];
for ( ; sb > 0; sb--,idx++) {
real v = xr[0][idx];
@@ -349,7 +367,7 @@
}
}
else
-@@ -1143,8 +1146,8 @@ maybe still wrong??? (copy 12 to 13?) */
+@@ -1143,8 +1146,8 @@
for ( sb = bi->longDiff[21]; sb > 0; sb--,idx++ ) {
real v = xr[0][idx];
@@ -360,7 +378,7 @@
}
}
} /* ... */
-@@ -1177,8 +1180,8 @@ static void III_antialias(real xr[SBLIMI
+@@ -1177,8 +1180,8 @@
for(ss=7;ss>=0;ss--)
{ /* upper and lower butterfly inputs */
register real bu = *--xr2,bd = *xr1;
@@ -371,7 +389,7 @@
}
}
}
-@@ -1252,8 +1255,8 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1252,8 +1255,8 @@
{
real t0, t1, t2;
@@ -382,7 +400,7 @@
t3 = in[0];
t2 = t3 - t1 - t1;
-@@ -1261,16 +1264,16 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1261,16 +1264,16 @@
tmp[4] = t2 + t0 + t0;
t3 += t1;
@@ -403,7 +421,7 @@
tmp[2] = tmp[6] = t3 - t0 - t2;
tmp[0] = tmp[8] = t3 + t0 + t1;
-@@ -1280,9 +1283,9 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1280,9 +1283,9 @@
{
real t1, t2, t3;
@@ -416,7 +434,7 @@
{
real t0 = t1 + t2 + t3;
-@@ -1293,7 +1296,7 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1293,7 +1296,7 @@
t2 -= t3;
t1 -= t3;
@@ -425,7 +443,7 @@
t1 += t3;
tmp[3] += t1;
-@@ -1308,35 +1311,35 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1308,35 +1311,35 @@
{
real t0, t1, t2, t3, t4, t5, t6, t7;
@@ -471,7 +489,7 @@
tmp[5] = t3 - t2;
t4 -= t1 + t7;
-@@ -1351,53 +1354,53 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1351,53 +1354,53 @@
{
real t0, t1, t2, t3, t4, t5, t6, t7;
@@ -548,7 +566,7 @@
{
register real *out2 = o2;
-@@ -1422,20 +1425,20 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1422,20 +1425,20 @@
#define MACRO0(v) { \
real tmp; \
@@ -575,7 +593,7 @@
MACRO0(v); }
register const real *c = COS9;
-@@ -1446,17 +1449,17 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1446,17 +1449,17 @@
real ta33,ta66,tb33,tb66;
@@ -601,7 +619,7 @@
MACRO1(0);
MACRO2(8);
-@@ -1464,10 +1467,10 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1464,10 +1467,10 @@
{
real tmp1a,tmp2a,tmp1b,tmp2b;
@@ -616,7 +634,7 @@
MACRO1(1);
MACRO2(7);
-@@ -1475,10 +1478,10 @@ static void dct36(real *inbuf,real *o1,r
+@@ -1475,10 +1478,10 @@
{
Home |
Main Index |
Thread Index |
Old Index