listen to the gstreamer bus for errors, then terminate correctly

This commit is contained in:
fduncanh
2021-08-04 18:36:20 -04:00
parent 7a60e958b2
commit 8e6a9ca795
3 changed files with 46 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ static int start_server (std::vector<char> hw_addr, std::string name, unsigned s
unsigned short tcp[2], unsigned short udp[3], videoflip_t videoflip,
bool use_audio, bool debug_log);
int stop_server ();
static int stop_server ();
static bool running = false;
static dnssd_t *dnssd = NULL;
@@ -271,7 +271,7 @@ int main (int argc, char *argv[]) {
}
running = true;
while (running) {
sleep(1);
if (!(video_renderer_listen(video_renderer))) break;
}
LOGI("Stopping...");