add printing of seek points in verbose mode
authorJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 13 Apr 2001 21:59:42 +0000 (21:59 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 13 Apr 2001 21:59:42 +0000 (21:59 +0000)
src/flac/encode.c

index ad41300..2559229 100644 (file)
@@ -499,12 +499,12 @@ bool init(encoder_wrapper_struct *encoder_wrapper)
 
 bool init_encoder(bool lax, bool do_mid_side, bool loose_mid_side, bool do_exhaustive_model_search, bool do_qlp_coeff_prec_search, unsigned rice_optimization_level, unsigned max_lpc_order, unsigned blocksize, unsigned qlp_coeff_precision, unsigned channels, unsigned bps, unsigned sample_rate, unsigned padding, char *requested_seek_points, int num_requested_seek_points, encoder_wrapper_struct *encoder_wrapper)
 {
+       unsigned i;
+
        if(channels != 2)
                do_mid_side = loose_mid_side = false;
 
        if(encoder_wrapper->verify) {
-               unsigned i;
-
                /* set up the fifo which will hold the original signal to compare against */
                encoder_wrapper->verify_fifo.size = blocksize + CHUNK_OF_SAMPLES;
                for(i = 0; i < channels; i++) {
@@ -534,6 +534,17 @@ bool init_encoder(bool lax, bool do_mid_side, bool loose_mid_side, bool do_exhau
                return false;
        }
 
+       if(encoder_wrapper->verbose && encoder_wrapper->seek_table.num_points > 0) {
+               printf("seek points:");
+               for(i = 0; i < encoder_wrapper->seek_table.num_points; i++) {
+                       if(encoder_wrapper->seek_table.points[i].sample_number != FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER)
+                               printf(" %llu", encoder_wrapper->seek_table.points[i].sample_number);
+                       else
+                               printf(" X");
+               }
+               printf("\n");
+       }
+
        encoder_wrapper->encoder->streamable_subset = !lax;
        encoder_wrapper->encoder->channels = channels;
        encoder_wrapper->encoder->bits_per_sample = bps;