Commit ef04f23e authored by Bangun K's avatar Bangun K Committed by Ralph Giles

oggenc: win32: fix segfault when encoding from stdin

parent 9d926044
......@@ -383,14 +383,19 @@ int main(int argc, char **argv)
enc_opts.out = out;
enc_opts.comments = &vc;
#ifdef _WIN32
enc_opts.filename = NULL;
enc_opts.infilename = NULL;
if (opt.isutf8) {
enc_opts.filename = NULL;
enc_opts.infilename = NULL;
utf8_decode(out_fn, &enc_opts.filename);
utf8_decode(infiles[i], &enc_opts.infilename);
if (out_fn)
utf8_decode(out_fn, &enc_opts.filename);
if (infiles[i])
utf8_decode(infiles[i], &enc_opts.infilename);
} else {
enc_opts.filename = strdup(out_fn);
enc_opts.infilename = strdup(infiles[i]);
if (out_fn)
enc_opts.filename = strdup(out_fn);
if (infiles[i])
enc_opts.infilename = strdup(infiles[i]);
}
#else
enc_opts.filename = out_fn;
......
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