freebsd-ports/audio/mpg123/files/patch-layer2.c
Tom Rhodes 3b3f21b362 Fix recently found bug.
Submitted by:	Roman Bogorodskiy <bogorodskiy@inbox.ru> (maintainer)
Approved by:	portmgr (linimon)
2004-09-11 04:55:48 +00:00

14 lines
428 B
C

diff -u -r1.1.1.1 layer2.c
--- layer2.c 1999/02/10 12:13:06 1.1.1.1
+++ layer2.c 2004/09/02 21:43:58
@@ -265,6 +265,11 @@
fr->jsbound = (fr-&gt;>mode == MPG_MD_JOINT_STEREO) ?
(fr->mode_ext<<2)+4 : fr->II_sblimit;
+ if (fr->jsbound > fr->II_sblimit) {
+ fprintf(stderr, "Truncating stereo boundary to sideband limit.\n");
+ fr->jsbound=fr->II_sblimit;
+ }
+
if(stereo == 1 || single == 3)
single = 0;