stream_encoder.c: Make compression_levels_ array const
authorErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 6 Jan 2017 09:01:18 +0000 (20:01 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 6 Jan 2017 09:01:22 +0000 (20:01 +1100)
As pointed out by github user @randomascii, the `compression_levels_`
struct could and should be const.

Closes: https://github.com/xiph/flac/issues/26

src/libFLAC/stream_encoder.c

index 037b8cb..e1cba75 100644 (file)
@@ -99,7 +99,7 @@ typedef enum {
        ENCODER_IN_AUDIO = 2
 } EncoderStateHint;
 
-static struct CompressionLevels {
+static const  struct CompressionLevels {
        FLAC__bool do_mid_side_stereo;
        FLAC__bool loose_mid_side_stereo;
        unsigned max_lpc_order;