Skip to content

Commit 28416fa

Browse files
committed
fixed video player object on linux
1 parent c864527 commit 28416fa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/objects/video/VideoPlayer.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void VideoPlayer::updateObjectContent(map<int,shared_ptr<PatchObject>> &patchObj
136136
void VideoPlayer::drawObjectContent(ofxFontStash *font, shared_ptr<ofBaseGLRenderer>& glRenderer){
137137
ofSetColor(255);
138138

139-
if(!isFileLoaded && video->isLoaded() && video->isInitialized()){
139+
if(!isFileLoaded && video->isLoaded()){
140140
video->setLoopState(OF_LOOP_NONE);
141141
video->setVolume(0);
142142
video->play();
@@ -155,8 +155,11 @@ void VideoPlayer::drawObjectContent(ofxFontStash *font, shared_ptr<ofBaseGLRende
155155
static_cast<ofTexture *>(_outletParams[0])->allocate(video->getWidth(),video->getHeight(),GL_RGB);
156156
static_cast<ofTexture *>(_outletParams[0])->clear();
157157
}else{
158-
//static_cast<ofTexture *>(_outletParams[0])->loadData(video->getPixels());
158+
#ifdef TARGET_OSX
159159
*static_cast<ofTexture *>(_outletParams[0]) = video->getTexture();
160+
#else
161+
static_cast<ofTexture *>(_outletParams[0])->loadData(video->getPixels());
162+
#endif
160163
}
161164

162165
// listen to message control (_inletParams[0])

0 commit comments

Comments
 (0)