forked from bartvdbraak/blender
BGE VideoTexture: refresh() on ImageFFmpeg should have no effect.
ImageFFmpeg objects will not refresh properly because the image file is closed immediately after creation. Therefore refresh() should have no effect on them. This was causing problems with ImageMix using ImageFFmpeg as sources: refreshing the ImageMix object is required to update the mix but it has the side effect of refreshing the underlying sources, hence the need to skip refresh on fixed images.
This commit is contained in:
parent
226eb53bc7
commit
cf7bdb42ac
@ -86,6 +86,13 @@ VideoFFmpeg::~VideoFFmpeg ()
|
||||
{
|
||||
}
|
||||
|
||||
void VideoFFmpeg::refresh(void)
|
||||
{
|
||||
// a fixed image will not refresh because it is loaded only once at creation
|
||||
if (m_isImage)
|
||||
return;
|
||||
m_avail = false;
|
||||
}
|
||||
|
||||
// release components
|
||||
bool VideoFFmpeg::release()
|
||||
|
@ -85,7 +85,8 @@ public:
|
||||
|
||||
/// release video source
|
||||
virtual bool release (void);
|
||||
|
||||
/// overwrite base refresh to handle fixed image
|
||||
virtual void refresh(void);
|
||||
/// play video
|
||||
virtual bool play (void);
|
||||
/// pause video
|
||||
|
Loading…
Reference in New Issue
Block a user