From 48139101f35963c3ff8b772b60789cb4dd8a6f63 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 3 Mar 2016 01:48:01 +0100 Subject: [PATCH] Never send in a frame rate of 0/0. --- decklink_capture.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/decklink_capture.cpp b/decklink_capture.cpp index 2bc5fc9..62af1c0 100644 --- a/decklink_capture.cpp +++ b/decklink_capture.cpp @@ -251,6 +251,9 @@ HRESULT STDMETHODCALLTYPE DeckLinkCapture::VideoInputFrameArrived( VideoFormat video_format; AudioFormat audio_format; + video_format.frame_rate_nom = time_scale; + video_format.frame_rate_den = frame_duration; + if (video_frame) { video_format.has_signal = !(video_frame->GetFlags() & bmdFrameHasNoInputSource); @@ -286,8 +289,6 @@ HRESULT STDMETHODCALLTYPE DeckLinkCapture::VideoInputFrameArrived( video_format.width = width; video_format.height = height; - video_format.frame_rate_nom = time_scale; - video_format.frame_rate_den = frame_duration; } } -- 2.39.2