1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

ffserver: explicitly use time_t for uptime calc

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2015-12-14 23:28:03 -08:00
parent dadb95142b
commit 0bdf84b6b0

View File

@ -3807,7 +3807,8 @@ static void compute_bandwidth(void)
static void handle_child_exit(int sig)
{
pid_t pid;
int status, uptime;
int status;
time_t uptime;
while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
FFServerStream *feed;
@ -3819,7 +3820,8 @@ static void handle_child_exit(int sig)
uptime = time(0) - feed->pid_start;
feed->pid = 0;
fprintf(stderr,
"%s: Pid %"PRId64" exited with status %d after %d seconds\n",
"%s: Pid %"PRId64" exited with status %d after %"PRId64" "
"seconds\n",
feed->filename, (int64_t) pid, status, uptime);
if (uptime < 30)