From c1b32e2a40f386489fc796b43c8afca99db32dea Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 23 May 2017 21:17:20 +0200 Subject: [PATCH] Be slightly clearer about what happens when we try to enable output with no matching modes. Still not really handled well. --- bmusb | 2 +- decklink_output.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bmusb b/bmusb index 36ed21d..b18056f 160000 --- a/bmusb +++ b/bmusb @@ -1 +1 @@ -Subproject commit 36ed21d8e2c4590d7f6489efc05489f21da8d5be +Subproject commit b18056fe32dd46134d7f12165bfa083378f2d9bb diff --git a/decklink_output.cpp b/decklink_output.cpp index d6ce684..f2ac40b 100644 --- a/decklink_output.cpp +++ b/decklink_output.cpp @@ -67,6 +67,11 @@ void DeckLinkOutput::start_output(uint32_t mode, int64_t base_pts) assert(output); assert(!playback_initiated); + if (video_modes.empty()) { + fprintf(stderr, "ERROR: No matching output modes for %dx%d found\n", width, height); + exit(1); + } + should_quit.unquit(); playback_initiated = true; playback_started = false; -- 2.39.2