]> git.sesse.net Git - nageru/commitdiff
Never send in a frame rate of 0/0.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 3 Mar 2016 00:48:01 +0000 (01:48 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 3 Mar 2016 00:48:01 +0000 (01:48 +0100)
decklink_capture.cpp

index 2bc5fc9d77cdab7c5e83a4d5e9db7d2af379cb44..62af1c0b558b54b0e5615c19771c42f62506c3dd 100644 (file)
@@ -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;
                }
        }