mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-25 04:11:38 +00:00
Fix for NULL output filename.
If no -o is suppled with stdin/network etc, the output name generated was NULL, leading to creation of files like `.srt` which were in category of hidden files.
This commit is contained in:
parent
851894dceb
commit
5ce5dc7fae
@ -817,6 +817,11 @@ static int init_output_ctx(struct encoder_ctx *ctx, struct encoder_cfg *cfg)
|
||||
basefilename = get_basename(ctx->first_input_file);
|
||||
extension = get_file_extension(cfg->write_format);
|
||||
|
||||
if (basefilename == NULL)
|
||||
{
|
||||
basefilename = get_basename("utitled");
|
||||
}
|
||||
|
||||
if (cfg->extract == 12)
|
||||
{
|
||||
ret = init_write(&ctx->out[0], create_outfilename(basefilename, "_1", extension), cfg->with_semaphore);
|
||||
|
Loading…
Reference in New Issue
Block a user