Commit fb6cf507 authored by Michael Smith's avatar Michael Smith

Fix a minor bug that caused crashes if --resample was used to 'resample' to the

same rate as the input.

svn path=/trunk/vorbis-tools/; revision=4090
parent 7706a8c2
...@@ -318,7 +318,7 @@ int main(int argc, char **argv) ...@@ -318,7 +318,7 @@ int main(int argc, char **argv)
else { else {
fprintf(stderr, _("ERROR: Can't downmix except from stereo to mono\n")); fprintf(stderr, _("ERROR: Can't downmix except from stereo to mono\n"));
errors++; errors++;
if(opt.resamplefreq) if(opt.resamplefreq && opt.resamplefreq != enc_opts.rate)
clear_resample(&enc_opts); clear_resample(&enc_opts);
goto clear_all; goto clear_all;
} }
...@@ -348,7 +348,7 @@ int main(int argc, char **argv) ...@@ -348,7 +348,7 @@ int main(int argc, char **argv)
clear_scaler(&enc_opts); clear_scaler(&enc_opts);
if(opt.downmix) if(opt.downmix)
clear_downmix(&enc_opts); clear_downmix(&enc_opts);
if(opt.resamplefreq) if(opt.resamplefreq && opt.resamplefreq != enc_opts.rate)
clear_resample(&enc_opts); clear_resample(&enc_opts);
clear_all: clear_all:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment