Skip to content

Commit

Permalink
ffmpeg restart delay
Browse files Browse the repository at this point in the history
  • Loading branch information
amukhsimov committed Mar 17, 2021
1 parent 1a4c8bd commit a820980
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ int main(int argc, char *argv[]) {
return 0;
}

FILE *fFfmpeg;

void *begin_rtmp(void *opinfo) {
char command[1000];
snprintf(command, 1000,
Expand All @@ -273,6 +275,7 @@ void *begin_rtmp(void *opinfo) {
while (true) {
cout << "Start ffmpeg" << endl;
system(command);
cout << "FFmpeg is closed, restarting in 1 second..." << endl;
sleep(1);
}

Expand Down

0 comments on commit a820980

Please sign in to comment.