From 5899bcb73ec296580a7e428b78c46a7dd2a6ac1e Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Wed, 20 Oct 2004 00:13:34 +0000 Subject: [PATCH] fix bug in handling of --input-size --- src/flac/main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/flac/main.c b/src/flac/main.c index ebab4956..1ddea280 100644 --- a/src/flac/main.c +++ b/src/flac/main.c @@ -1535,12 +1535,14 @@ int encode_file(const char *infilename, FLAC__bool is_first_file, FLAC__bool is_ } } - if(option_values.format_input_size >= 0 && (fmt != RAW || infilesize >= 0)) { - flac__utils_printf(stderr, 1, "ERROR: can only use --input-size when encoding raw samples from stdin\n"); - return 1; - } - else { - infilesize = option_values.format_input_size; + if(option_values.format_input_size >= 0) { + if (fmt != RAW || infilesize >= 0) { + flac__utils_printf(stderr, 1, "ERROR: can only use --input-size when encoding raw samples from stdin\n"); + return 1; + } + else { + infilesize = option_values.format_input_size; + } } if(option_values.sector_align && fmt == RAW && infilesize < 0) {