[Bf-blender-cvs] [18829ee] decklink: Decklink: fix framerate calculation.

Benoit Bolsee noreply at git.blender.org
Sun Dec 20 12:15:51 CET 2015


Commit: 18829ee54ae970b3fd2dec74a1d89c24d3085961
Author: Benoit Bolsee
Date:   Sun Dec 20 12:11:37 2015 +0100
Branches: decklink
https://developer.blender.org/rB18829ee54ae970b3fd2dec74a1d89c24d3085961

Decklink: fix framerate calculation.

For some reason the framerate attribute of the VideoDeclink object was
was wrong by 1.
framerate now returns the correct value.

===================================================================

M	source/gameengine/VideoTexture/VideoDeckLink.cpp

===================================================================

diff --git a/source/gameengine/VideoTexture/VideoDeckLink.cpp b/source/gameengine/VideoTexture/VideoDeckLink.cpp
index b20242e..85de6e6 100644
--- a/source/gameengine/VideoTexture/VideoDeckLink.cpp
+++ b/source/gameengine/VideoTexture/VideoDeckLink.cpp
@@ -863,7 +863,7 @@ void VideoDeckLink::openCam (char *format, short camIdx)
 	// for information, in case the application wants to know
 	m_size[0] = mFrameWidth;
 	m_size[1] = mTextureDesc.height;
-	m_frameRate = 1.0f+(float)frameTimescale / (float)frameDuration;
+    m_frameRate = (float)frameTimescale / (float)frameDuration;
 
 	switch (mPixelFormat)
 	{




More information about the Bf-blender-cvs mailing list