winemp3: remove exit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Small fix from TG's LGPL'ed winemp3.  Changes by Ove, Changelog
adapted from his.

Changelog:
        Ove Kaaven
        Remove an instance of exit(). We should return failure, not kill the
        thread, when a bad stream is encountered.


Index: winemp3/common.c
===================================================================
RCS file: /home/wine/wine/dlls/msacm/winemp3/common.c,v
retrieving revision 1.1
diff -u -r1.1 common.c
--- winemp3/common.c	4 Jun 2002 17:53:47 -0000	1.1
+++ winemp3/common.c	7 Dec 2003 04:55:58 -0000
@@ -84,7 +84,7 @@
     fr->lay = 4-((newhead>>17)&3);
     if( ((newhead>>10)&0x3) == 0x3) {
       fprintf(stderr,"Stream error\n");
-      exit(1);
+      return (0);
     }
     if(fr->mpeg25) {
       fr->sampling_frequency = 6 + ((newhead>>10)&0x3);
Index: winemp3/interface.c
===================================================================
RCS file: /home/wine/wine/dlls/msacm/winemp3/interface.c,v
retrieving revision 1.1
diff -u -r1.1 interface.c
--- winemp3/interface.c	4 Jun 2002 17:53:47 -0000	1.1
+++ winemp3/interface.c	7 Dec 2003 04:56:01 -0000
@@ -175,7 +175,9 @@
 			return MP3_NEED_MORE;
 		}
 		read_head(mp);
-		decode_header(&mp->fr,mp->header);
+		if (decode_header(&mp->fr,mp->header) == 0) {
+			return MP3_ERR;
+		}
 		mp->framesize = mp->fr.framesize;
 	}
 


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux