Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/obs-ffmpeg/obs-ffmpeg-mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,10 @@ static void generate_filename(struct ffmpeg_muxer *stream, struct dstr *dst, boo
char *filename = os_generate_formatted_filename(ext, space, fmt);

dstr_copy(dst, dir);
dstr_replace(dst, "\\", "/");
if (dstr_end(dst) != '/')
if (dstr_end(dst) != '/' && dstr_end(dst) != '\\')
dstr_cat_ch(dst, '/');
dstr_cat(dst, filename);
dstr_replace(dst, "\\", "/");

char *slash = strrchr(dst->array, '/');
if (slash) {
Expand Down
4 changes: 2 additions & 2 deletions plugins/obs-outputs/mp4-output.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@ static void generate_filename(struct mp4_output *out, struct dstr *dst, bool ove
char *filename = os_generate_formatted_filename(ext, space, fmt);

dstr_copy(dst, dir);
dstr_replace(dst, "\\", "/");
if (dstr_end(dst) != '/')
if (dstr_end(dst) != '/' && dstr_end(dst) != '\\')
dstr_cat_ch(dst, '/');
dstr_cat(dst, filename);
dstr_replace(dst, "\\", "/");

char *slash = strrchr(dst->array, '/');
if (slash) {
Expand Down