|
|
|
@@ -495,20 +495,22 @@ static void start_children(FFServerStream *feed) |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
pathname = av_strdup (my_program_name); |
|
|
|
slash = strrchr(my_program_name, '/'); |
|
|
|
if (!slash) { |
|
|
|
pathname = av_mallocz(sizeof("ffmpeg")); |
|
|
|
} else { |
|
|
|
pathname = av_mallocz(slash - my_program_name + sizeof("ffmpeg")); |
|
|
|
if (pathname != NULL) { |
|
|
|
memcpy(pathname, my_program_name, slash - my_program_name); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!pathname) { |
|
|
|
http_log("Could not allocate memory for children cmd line\n"); |
|
|
|
return; |
|
|
|
} |
|
|
|
/* replace "ffserver" with "ffmpeg" in the path of current |
|
|
|
* program. Ignore user provided path */ |
|
|
|
/* use "ffmpeg" in the path of current program. Ignore user provided path */ |
|
|
|
|
|
|
|
slash = strrchr(pathname, '/'); |
|
|
|
if (!slash) |
|
|
|
slash = pathname; |
|
|
|
else |
|
|
|
slash++; |
|
|
|
strcpy(slash, "ffmpeg"); |
|
|
|
strcat(pathname, "ffmpeg"); |
|
|
|
|
|
|
|
for (; feed; feed = feed->next) { |
|
|
|
|
|
|
|
|