diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-06-07 01:54:12 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-06-07 01:54:12 +0400 |
commit | 80571c04085165e961ba7efa0761e670104dc6d5 (patch) | |
tree | 337dc54d190b7bc980103137e4b782b1ac88c94a /source/gameengine | |
parent | 580e69b365a2b308bc5d8a2e7cc41b7f3ee5c248 (diff) |
BGE VideoTexture: fix VideoFFmpeg range attribute + error message.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/VideoTexture/VideoBase.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/VideoFFmpeg.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/source/gameengine/VideoTexture/VideoBase.cpp b/source/gameengine/VideoTexture/VideoBase.cpp index ada672c5569..5d449a158d8 100644 --- a/source/gameengine/VideoTexture/VideoBase.cpp +++ b/source/gameengine/VideoTexture/VideoBase.cpp @@ -149,7 +149,7 @@ int Video_setRange (PyImage * self, PyObject * value, void * closure) || !PyFloat_Check(PySequence_Fast_GET_ITEM(value, 0)) || !PyFloat_Check(PySequence_Fast_GET_ITEM(value, 1))) { - PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 2 longs"); + PyErr_SetString(PyExc_TypeError, "The value must be a sequence of 2 float"); return -1; } // set range diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp index 7910113a225..1a5481488c0 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp +++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp @@ -117,6 +117,7 @@ bool VideoFFmpeg::release() } m_codec = NULL; m_status = SourceStopped; + m_lastFrame = -1; return true; } @@ -735,7 +736,7 @@ void VideoFFmpeg::loadFrame (void) { // get actual time double startTime = PIL_check_seconds_timer(); - if (m_lastFrame == -1) + if (m_lastFrame == -1 && !m_isFile) m_startTime = startTime; double actTime = startTime - m_startTime; // if video has ended |