mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-15 07:44:10 +00:00
libobs: Check for extension validity in os_generate_formatted_filename
In some cases (ffmpeg_mux), the extension and format values are a direct passthrough from arbitrary data. Instead of always postfixing a `.` at the end of a generated path if the extension is invalid, don't postfix the `.` at all. Before: `my_formatted_string.` After: `my_formatted_string`
This commit is contained in:
parent
f75fa626d8
commit
681093616a
|
@ -796,8 +796,11 @@ char *os_generate_formatted_filename(const char *extension, bool space,
|
|||
if (!space)
|
||||
dstr_replace(&sf, " ", "_");
|
||||
|
||||
if (extension && *extension) {
|
||||
dstr_cat_ch(&sf, '.');
|
||||
dstr_cat(&sf, extension);
|
||||
}
|
||||
|
||||
dstr_free(&c);
|
||||
|
||||
if (sf.len > 255)
|
||||
|
|
Loading…
Reference in a new issue