SOURCES: alsaplayer-flac.patch - fix for 64 bit systems

hawk hawk at pld-linux.org
Sun Apr 1 15:53:30 CEST 2007


Author: hawk                         Date: Sun Apr  1 13:53:30 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix for 64 bit systems

---- Files affected:
SOURCES:
   alsaplayer-flac.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/alsaplayer-flac.patch
diff -u SOURCES/alsaplayer-flac.patch:1.1 SOURCES/alsaplayer-flac.patch:1.2
--- SOURCES/alsaplayer-flac.patch:1.1	Wed Jan  3 02:44:31 2007
+++ SOURCES/alsaplayer-flac.patch	Sun Apr  1 15:53:25 2007
@@ -1,40 +1,6 @@
---- alsaplayer-0.99.76/input/flac/FlacStream.cpp.orig	2007-01-01 23:56:02.000000000 +0000
-+++ alsaplayer-0.99.76/input/flac/FlacStream.cpp	2007-01-02 00:16:49.000000000 +0000
-@@ -116,21 +116,22 @@
- 	return false;
-     }
-     bool status = true;
--    status &= FLAC__stream_decoder_set_read_callback (_decoder,
--						      readCallBack);
--    status &= FLAC__stream_decoder_set_write_callback (_decoder, 
--						     writeCallBack);
--    status &= FLAC__stream_decoder_set_metadata_callback (_decoder,
--							metaCallBack);
--    status &= FLAC__stream_decoder_set_error_callback (_decoder,
--						     errCallBack);
--    status &= FLAC__stream_decoder_set_client_data (_decoder, (void *) this);
- 
-     if (!status) {
- 	apError("FlacStream::open(): status error, huh?");    
- 	return false;
-     }
--    status = (FLAC__stream_decoder_init (_decoder) == FLAC__STREAM_DECODER_SEARCH_FOR_METADATA);
-+    status = (FLAC__stream_decoder_init_stream ( _decoder,
-+						readCallBack,
-+						NULL,
-+						NULL,
-+						NULL,
-+						NULL,
-+						writeCallBack,
-+						metaCallBack,
-+						errCallBack,
-+						(void *) this) 
-+		    == FLAC__STREAM_DECODER_INIT_STATUS_OK);
-     
-     if (!status) {
- 	apError("FlacStream::open(): can't initialize stream decoder");    
---- alsaplayer-0.99.76/input/flac/FlacSeekableStream.cpp.orig	2007-01-02 00:04:26.000000000 +0000
-+++ alsaplayer-0.99.76/input/flac/FlacSeekableStream.cpp	2007-01-02 00:43:29.000000000 +0000
+diff -ur alsaplayer-0.99.77.orig/input/flac/FlacSeekableStream.cpp alsaplayer-0.99.77/input/flac/FlacSeekableStream.cpp
+--- alsaplayer-0.99.77.orig/input/flac/FlacSeekableStream.cpp	2003-03-03 09:32:59.000000000 +0100
++++ alsaplayer-0.99.77/input/flac/FlacSeekableStream.cpp	2007-04-01 15:46:30.000000000 +0200
 @@ -39,8 +39,8 @@
  {
      if (_decoder)
@@ -158,7 +124,8 @@
 +FLAC__StreamDecoderReadStatus
 +FlacSeekableStream::readCallBack (const FLAC__StreamDecoder * /*decoder*/,
  				  FLAC__byte buffer[],
- 				  unsigned * bytes,
+-				  unsigned * bytes,
++				  size_t * bytes,
  				  void * client_data)
  {
      if (!client_data)
@@ -267,8 +234,9 @@
  				 void * client_data)
  {
      if (!client_data)
---- alsaplayer-0.99.76/input/flac/FlacSeekableStream.h.orig	2007-01-01 23:42:27.000000000 +0000
-+++ alsaplayer-0.99.76/input/flac/FlacSeekableStream.h	2007-01-01 23:51:07.000000000 +0000
+diff -ur alsaplayer-0.99.77.orig/input/flac/FlacSeekableStream.h alsaplayer-0.99.77/input/flac/FlacSeekableStream.h
+--- alsaplayer-0.99.77.orig/input/flac/FlacSeekableStream.h	2003-03-03 09:32:59.000000000 +0100
++++ alsaplayer-0.99.77/input/flac/FlacSeekableStream.h	2007-04-01 15:45:53.000000000 +0200
 @@ -28,7 +28,7 @@
  
  extern "C"
@@ -299,7 +267,8 @@
 +    static FLAC__StreamDecoderReadStatus
 +	readCallBack (const FLAC__StreamDecoder * decoder,
  		      FLAC__byte buffer[],
- 		      unsigned * bytes,
+-		      unsigned * bytes,
++		      size_t * bytes,
  		      void * client_data);
  
 -    static void errCallBack (const FLAC__SeekableStreamDecoder * decoder,
@@ -342,3 +311,102 @@
  
  }; // class FlacSeekableStream
  
+diff -ur alsaplayer-0.99.77.orig/input/flac/FlacStream.cpp alsaplayer-0.99.77/input/flac/FlacStream.cpp
+--- alsaplayer-0.99.77.orig/input/flac/FlacStream.cpp	2003-03-09 03:46:33.000000000 +0100
++++ alsaplayer-0.99.77/input/flac/FlacStream.cpp	2007-04-01 15:45:45.000000000 +0200
+@@ -116,21 +116,22 @@
+ 	return false;
+     }
+     bool status = true;
+-    status &= FLAC__stream_decoder_set_read_callback (_decoder,
+-						      readCallBack);
+-    status &= FLAC__stream_decoder_set_write_callback (_decoder, 
+-						     writeCallBack);
+-    status &= FLAC__stream_decoder_set_metadata_callback (_decoder,
+-							metaCallBack);
+-    status &= FLAC__stream_decoder_set_error_callback (_decoder,
+-						     errCallBack);
+-    status &= FLAC__stream_decoder_set_client_data (_decoder, (void *) this);
+ 
+     if (!status) {
+ 	apError("FlacStream::open(): status error, huh?");    
+ 	return false;
+     }
+-    status = (FLAC__stream_decoder_init (_decoder) == FLAC__STREAM_DECODER_SEARCH_FOR_METADATA);
++    status = (FLAC__stream_decoder_init_stream ( _decoder,
++						readCallBack,
++						NULL,
++						NULL,
++						NULL,
++						NULL,
++						writeCallBack,
++						metaCallBack,
++						errCallBack,
++						(void *) this) 
++		    == FLAC__STREAM_DECODER_INIT_STATUS_OK);
+     
+     if (!status) {
+ 	apError("FlacStream::open(): can't initialize stream decoder");    
+@@ -300,7 +301,7 @@
+ 
+ 
+ FLAC__StreamDecoderReadStatus
+-FlacStream::realReadCallBack (FLAC__byte buffer[], unsigned * bytes)
++FlacStream::realReadCallBack (FLAC__byte buffer[], size_t * bytes)
+ {
+     *bytes = reader_read (buffer, *bytes, _datasource);
+     return *bytes > 0 ? FLAC__STREAM_DECODER_READ_STATUS_CONTINUE :
+@@ -315,7 +316,7 @@
+ FLAC__StreamDecoderReadStatus
+ FlacStream::readCallBack (const FLAC__StreamDecoder *,
+ 			  FLAC__byte buffer[],
+-			  unsigned * bytes,
++			  size_t * bytes,
+ 			  void * client_data)
+ {
+     if (!client_data)
+diff -ur alsaplayer-0.99.77.orig/input/flac/FlacStream.h alsaplayer-0.99.77/input/flac/FlacStream.h
+--- alsaplayer-0.99.77.orig/input/flac/FlacStream.h	2003-03-03 09:32:59.000000000 +0100
++++ alsaplayer-0.99.77/input/flac/FlacStream.h	2007-04-01 15:46:08.000000000 +0200
+@@ -191,7 +191,7 @@
+ 
+     FLAC__StreamDecoderReadStatus 
+                  realReadCallBack (FLAC__byte buffer[],
+-				   unsigned * bytes);
++				   size_t * bytes);
+ 
+ 
+  protected:
+@@ -233,7 +233,7 @@
+     static FLAC__StreamDecoderReadStatus
+ 	readCallBack (const FLAC__StreamDecoder * decoder,
+ 		      FLAC__byte buffer[],
+-		      unsigned * bytes,
++		      size_t * bytes,
+ 		      void * client_data);
+ 
+     static void errCallBack (const FLAC__StreamDecoder * decoder,
+diff -ur alsaplayer-0.99.77.orig/input/flac/OggFlacStream.cpp alsaplayer-0.99.77/input/flac/OggFlacStream.cpp
+--- alsaplayer-0.99.77.orig/input/flac/OggFlacStream.cpp	2003-03-09 03:46:34.000000000 +0100
++++ alsaplayer-0.99.77/input/flac/OggFlacStream.cpp	2007-04-01 15:46:39.000000000 +0200
+@@ -186,7 +186,7 @@
+ FLAC__StreamDecoderReadStatus
+ OggFlacStream::readCallBack (const OggFLAC__StreamDecoder * decoder,
+ 			     FLAC__byte buffer[],
+-			     unsigned * bytes,
++			     size_t * bytes,
+ 			     void * client_data)
+ {
+     if (!client_data)
+diff -ur alsaplayer-0.99.77.orig/input/flac/OggFlacStream.h alsaplayer-0.99.77/input/flac/OggFlacStream.h
+--- alsaplayer-0.99.77.orig/input/flac/OggFlacStream.h	2003-03-03 09:33:47.000000000 +0100
++++ alsaplayer-0.99.77/input/flac/OggFlacStream.h	2007-04-01 15:46:18.000000000 +0200
+@@ -105,7 +105,7 @@
+     static FLAC__StreamDecoderReadStatus
+ 	readCallBack (const OggFLAC__StreamDecoder * decoder,
+ 		      FLAC__byte buffer[],
+-		      unsigned * bytes,
++		      size_t * bytes,
+ 		      void * client_data);
+ 
+     static void errCallBack (const OggFLAC__StreamDecoder * decoder,
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/alsaplayer-flac.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list