Commit: 34f51cd4983db8d47ac41f949e466a520fa2173d Author: Ulysse Martin Date: Sat Nov 28 14:55:38 2015 +0100 Branches: master https://developer.blender.org/rB34f51cd4983db8d47ac41f949e466a520fa2173d
Fix a regression introduced by https://developer.blender.org/D1396 on video playing Fix a regression introduced by https://developer.blender.org/D1396 on video playing Look at @mariomey example file. Reviewers: panzergame Subscribers: mariomey Projects: #game_engine Differential Revision: https://developer.blender.org/D1623 =================================================================== M source/gameengine/VideoTexture/VideoFFmpeg.cpp =================================================================== diff --git a/source/gameengine/VideoTexture/VideoFFmpeg.cpp b/source/gameengine/VideoTexture/VideoFFmpeg.cpp index 9585d8b..3bf11fb 100644 --- a/source/gameengine/VideoTexture/VideoFFmpeg.cpp +++ b/source/gameengine/VideoTexture/VideoFFmpeg.cpp @@ -1024,11 +1024,11 @@ AVFrame *VideoFFmpeg::grabFrame(long position) AVFrame *input = m_frame; short counter = 0; - /* While the data is not read properly (png, tiffs, etc formats may need several pass)*/ - while ((input->data[0] == 0 && input->data[1] == 0 && input->data[2] == 0 && input->data[3] == 0) && counter < 10) { + /* If m_isImage, while the data is not read properly (png, tiffs, etc formats may need several pass), else don't need while loop*/ + do { avcodec_decode_video2(m_codecCtx, m_frame, &frameFinished, &packet); counter++; - } + } while ((input->data[0] == 0 && input->data[1] == 0 && input->data[2] == 0 && input->data[3] == 0) && counter < 10 && m_isImage); // remember dts to compute exact frame number dts = packet.dts; _______________________________________________ Bf-blender-cvs mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-blender-cvs
