diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-03 15:24:25 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-03 15:25:47 +0400 |
commit | 9bec4f777973c066ac12ae5ad2df107be23bdc7b (patch) | |
tree | 22e81bf056a0540936a5666cc9e36fd7a1dd4ecd /source/gameengine | |
parent | 15f449c52909d5275feb23d814988ded3369ba62 (diff) |
Fix T38455: Blenderplayer is not working
Was a regression since avg_frame_rate changes.
Didn't find reliable way to get stream duration which will
work with both FFmpeg and Libav so added some freaking black
magic to distinguish one from another.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/VideoTexture/VideoFFmpeg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp index 139988f64ea..3bad7c92efe 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp +++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp @@ -220,7 +220,7 @@ int VideoFFmpeg::openStream(const char *filename, AVInputFormat *inputFormat, AV codecCtx->frame_rate_base=1000; m_baseFrameRate = (double)codecCtx->frame_rate / (double)codecCtx->frame_rate_base; #else - m_baseFrameRate = av_q2d(formatCtx->streams[videoStream]->r_frame_rate); + m_baseFrameRate = av_q2d(av_get_r_frame_rate_compat(formatCtx->streams[videoStream])); #endif if (m_baseFrameRate <= 0.0) m_baseFrameRate = defFrameRate; |