X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fdecklink_output.cpp;h=6b21edb0c45d066ebf3d8d68a6f8ed27410f4f8d;hb=0eaa4d8a29782ae20d7b54fd8334371e724f1c57;hp=f6826b51366e4a73afcfdcf0edac39179601a5ad;hpb=9ffd4f03f314cc6e0254449593def95c9bc203d6;p=nageru diff --git a/nageru/decklink_output.cpp b/nageru/decklink_output.cpp index f6826b5..6b21edb 100644 --- a/nageru/decklink_output.cpp +++ b/nageru/decklink_output.cpp @@ -248,6 +248,11 @@ void DeckLinkOutput::end_output() frame_freelist.pop(); } } + + if (output != nullptr) { + output->Release(); + output = nullptr; + } } void DeckLinkOutput::send_frame(GLuint y_tex, GLuint cbcr_tex, YCbCrLumaCoefficients output_ycbcr_coefficients, const vector &input_frames, int64_t pts, int64_t duration) @@ -462,12 +467,12 @@ HRESULT DeckLinkOutput::ScheduledFrameCompleted(/* in */ IDeckLinkVideoFrame *co ++metric_decklink_output_completed_frames_late; break; case bmdOutputFrameDropped: - fprintf(stderr, "Output frame was dropped (pts=%" PRId64 "ld)\n", frame->pts); + fprintf(stderr, "Output frame was dropped (pts=%" PRId64 ")\n", frame->pts); fprintf(stderr, "Consider increasing --output-buffer-frames if this persists.\n"); ++metric_decklink_output_completed_frames_dropped; break; case bmdOutputFrameFlushed: - fprintf(stderr, "Output frame was flushed (pts=%" PRId64 "ld)\n", frame->pts); + fprintf(stderr, "Output frame was flushed (pts=%" PRId64 ")\n", frame->pts); ++metric_decklink_output_completed_frames_flushed; break; default: