minor comments
authorJosh Coalson <jcoalson@users.sourceforce.net>
Mon, 9 Oct 2006 05:34:21 +0000 (05:34 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Mon, 9 Oct 2006 05:34:21 +0000 (05:34 +0000)
configure.in
src/flac/decode.c
src/libFLAC/stream_encoder.c

index 29b3ee3..c5d89be 100644 (file)
@@ -273,7 +273,7 @@ fi
 CFLAGS="$OUR_CFLAGS_HEAD $CFLAGS"
 CXXFLAGS="$OUR_CFLAGS_HEAD $CXXFLAGS"
 
-#@@@@@@
+#@@@
 AM_CONDITIONAL(FLaC__HAS_AS__TEMPORARILY_DISABLED, test "yes" = "no")
 AM_CONDITIONAL(FLaC__HAS_GAS__TEMPORARILY_DISABLED, test "yes" = "no")
 
index 834841c..fec97d6 100644 (file)
@@ -975,7 +975,7 @@ FLAC__StreamDecoderWriteStatus write_callback(const FLAC__StreamDecoder *decoder
                        if(shift && !decoder_session->replaygain.apply) {
                                for(wide_sample = 0; wide_sample < wide_samples; wide_sample++)
                                        for(channel = 0; channel < channels; channel++)
-                                               /*@@@@@@bad un-const:fix@@@@@@*/((FLAC__int32**)buffer)[channel][wide_sample] <<= shift;
+                                               ((FLAC__int32**)buffer)[channel][wide_sample] <<= shift;/*@@@@@@un-const'ing the buffer is hacky but safe*/
                        }
                        if(decoder_session->replaygain.apply) {
                                bytes_to_write = FLAC__replaygain_synthesis__apply_gain(
index 123708c..5657778 100644 (file)
@@ -1115,11 +1115,6 @@ FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_FILE(FLAC__Stre
        FLAC__ASSERT(0 != encoder);
        FLAC__ASSERT(0 != file);
 
-       /*
-        * To make sure that our file does not go unclosed after an error, we
-        * must assign the FILE pointer before any further error can occur in
-        * this routine.
-        */
        if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED)
                return FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED;
 
@@ -1129,6 +1124,11 @@ FLAC_API FLAC__StreamEncoderInitStatus FLAC__stream_encoder_init_FILE(FLAC__Stre
                return FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR;
        }
 
+       /*
+        * To make sure that our file does not go unclosed after an error, we
+        * must assign the FILE pointer before any further error can occur in
+        * this routine.
+        */
        if(file == stdout)
                file = get_binary_stdout_(); /* just to be safe */