]> git.sesse.net Git - nageru/blobdiff - decklink_capture.cpp
Fix an issue with the correction factor locking to 0.95.
[nageru] / decklink_capture.cpp
index a0e890fcbcdd4fdc7c8bbb55e8212e8039980192..eee46c4454f528db07fd2593129b25949c3cd19d 100644 (file)
@@ -358,8 +358,6 @@ HRESULT STDMETHODCALLTYPE DeckLinkCapture::VideoInputFrameArrived(
 
                        video_format.width = width;
                        video_format.height = height;
-
-                       current_video_frame.received_timestamp = now;
                }
        }
 
@@ -376,11 +374,12 @@ HRESULT STDMETHODCALLTYPE DeckLinkCapture::VideoInputFrameArrived(
 
                        audio_format.bits_per_sample = 32;
                        audio_format.num_channels = 2;
-
-                       current_audio_frame.received_timestamp = now;
                }
        }
 
+       current_video_frame.received_timestamp = now;
+       current_audio_frame.received_timestamp = now;
+
        if (current_video_frame.data != nullptr || current_audio_frame.data != nullptr) {
                // TODO: Put into a queue and put into a dequeue thread, if the
                // BlackMagic drivers don't already do that for us?