X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mixer.cpp;h=f45880d321be6d2a1c17c5a61b7ba0babc28e846;hb=fa54f2630c56a1df0046923d6a77b1bd58abf240;hp=f1d116fe497bdeb0e6f020aef2a7b468624ede2a;hpb=868450678563ed2c9fd5240dca704d87371d1478;p=nageru diff --git a/mixer.cpp b/mixer.cpp index f1d116f..f45880d 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -353,7 +353,7 @@ Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards) theme.reset(new Theme(global_flags.theme_filename, global_flags.theme_dirs, resource_pool.get(), num_cards)); // Start listening for clients only once VideoEncoder has written its header, if any. - httpd.start(9095); + httpd.start(global_flags.http_port); // First try initializing the then PCI devices, then USB, then // fill up with fake cards until we have the desired number of cards. @@ -371,7 +371,10 @@ Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards) DeckLinkCapture *capture = new DeckLinkCapture(decklink, card_index); DeckLinkOutput *output = new DeckLinkOutput(resource_pool.get(), decklink_output_surface, global_flags.width, global_flags.height, card_index); - output->set_device(decklink); + if (!output->set_device(decklink)) { + delete output; + output = nullptr; + } configure_card(card_index, capture, CardType::LIVE_CARD, output); ++num_pci_devices; }