mirror of
https://github.com/zoriya/Kyoo.Transcoder.git
synced 2025-12-06 06:26:11 +00:00
Fixing chapter extraction
This commit is contained in:
@@ -114,14 +114,14 @@ void extract_chapters(AVFormatContext *ctx, const char *out_path)
|
||||
return;
|
||||
|
||||
const char *filename = strrchr(ctx->url, '/');
|
||||
char *path = malloc((strlen(filename) + strlen(out_path) + 14) * sizeof(char));
|
||||
char *path = malloc((strlen(filename) + strlen(out_path) + 15) * sizeof(char));
|
||||
char *tmp;
|
||||
|
||||
if (!path)
|
||||
return;
|
||||
strcpy(path, out_path);
|
||||
strcat(path, "/Chapters/");
|
||||
if (path_mkdir(path, 0755) < 0)
|
||||
if (path_mkdir_p(path, 0755) < 0)
|
||||
return;
|
||||
strcat(path, filename);
|
||||
tmp = strrchr(path, '.');
|
||||
|
||||
Reference in New Issue
Block a user