From 6e590293a0cb557120f0b742823975e7910ad3bd Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Fri, 13 Apr 2001 21:59:42 +0000 Subject: [PATCH] add printing of seek points in verbose mode --- src/flac/encode.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/flac/encode.c b/src/flac/encode.c index ad41300b..25592299 100644 --- a/src/flac/encode.c +++ b/src/flac/encode.c @@ -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; -- 2.34.1