From a41bb5ffa9883cff2a96ac789698542eed75c3cd Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Thu, 20 Jul 2023 15:34:44 +0200 Subject: [PATCH] DeckLink disp: fixed scheduled reconfigure Callback is removed in reconfigure if already initialized but was set only in _init. --- src/video_display/decklink.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video_display/decklink.cpp b/src/video_display/decklink.cpp index 54783ead6..1129f3b9a 100644 --- a/src/video_display/decklink.cpp +++ b/src/video_display/decklink.cpp @@ -999,6 +999,9 @@ display_decklink_reconfigure(void *state, struct video_desc desc) } if (!s->low_latency) { + // Provide this class as a delegate to a video output interface + s->deckLinkOutput->SetScheduledFrameCompletionCallback( + &s->delegate); auto *f = allocate_new_decklink_frame(s); for (int i = 0; i < s->delegate.m_preroll; ++i) { f->AddRef(); @@ -1421,9 +1424,6 @@ static void *display_decklink_init(struct module *parent, const char *fmt, unsig if (!s->low_latency) { s->delegate.SetDecklinkOutput(s->deckLinkOutput); - // Provide this class as a delegate to a video output interface - s->deckLinkOutput->SetScheduledFrameCompletionCallback( - &s->delegate); } // s->state.at(i).deckLinkOutput->DisableAudioOutput();