[xiph-commits] r14631 - trunk/vorbis-tools/oggenc
ivo at svn.xiph.org
ivo at svn.xiph.org
Tue Mar 25 16:42:21 PDT 2008
Author: ivo
Date: 2008-03-25 16:42:20 -0700 (Tue, 25 Mar 2008)
New Revision: 14631
Modified:
trunk/vorbis-tools/oggenc/oggenc.c
Log:
Prevents core dump while encoding from FLAC and resampling. Closes #1316. Thanks go to Sami Farin.
Modified: trunk/vorbis-tools/oggenc/oggenc.c
===================================================================
--- trunk/vorbis-tools/oggenc/oggenc.c 2008-03-25 20:08:04 UTC (rev 14630)
+++ trunk/vorbis-tools/oggenc/oggenc.c 2008-03-25 23:42:20 UTC (rev 14631)
@@ -147,6 +147,7 @@
char *artist=NULL, *album=NULL, *title=NULL, *track=NULL;
char *date=NULL, *genre=NULL;
input_format *format;
+ int resampled = 0;
/* Set various encoding defaults */
@@ -325,6 +326,8 @@
if(opt.resamplefreq && opt.resamplefreq != enc_opts.rate) {
int fromrate = enc_opts.rate;
+
+ resampled = 1;
enc_opts.resamplefreq = opt.resamplefreq;
if(setup_resample(&enc_opts)) {
errors++;
@@ -370,7 +373,7 @@
clear_scaler(&enc_opts);
if(opt.downmix)
clear_downmix(&enc_opts);
- if(opt.resamplefreq && opt.resamplefreq != enc_opts.rate)
+ if(resampled)
clear_resample(&enc_opts);
clear_all:
@@ -948,7 +951,7 @@
else
i = filenum;
- *album = opt->album[i];
+ *album = opt->album[i];
add_tag(vc, opt, "album", opt->album[i]);
}
More information about the commits
mailing list