Disabling chapter extration when no chapter exists

This commit is contained in:
Zoe Roux
2020-10-31 01:22:48 +01:00
parent 41e25f80e9
commit 9cb8460471

View File

@@ -110,6 +110,9 @@ void extract_font(stream *font, const char *out_path, AVStream *stream)
void extract_chapters(AVFormatContext *ctx, const char *out_path)
{
if (ctx->nb_chapters == 0)
return;
const char *filename = strrchr(ctx->url, '/');
char *path = malloc((strlen(filename) + strlen(out_path) + 14) * sizeof(char));
char *tmp;