DeckLink disp: fixed scheduled reconfigure

Callback is removed in reconfigure if already initialized but was set
only in _init.
This commit is contained in:
Martin Pulec
2023-07-20 15:34:44 +02:00
parent c1891a2b82
commit a41bb5ffa9

View File

@@ -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();