File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -999,7 +999,8 @@ def clearTextures(self):
999999 of your stimulus, so doesn't need calling explicitly by the user.
10001000 """
10011001 GL .glDeleteTextures (1 , self ._texID )
1002- GL .glDeleteTextures (1 , self ._maskID )
1002+ if hasattr (self , '_maskID' ):
1003+ GL .glDeleteTextures (1 , self ._maskID )
10031004
10041005 @attributeSetter
10051006 def mask (self , value ):
Original file line number Diff line number Diff line change 3838from psychopy import logging , prefs #adding prefs to be able to check sound lib -JK
3939from psychopy .tools .arraytools import val2array
4040from psychopy .tools .attributetools import logAttrib , setAttribute
41- from psychopy .visual .basevisual import BaseVisualStim , ContainerMixin
41+ from psychopy .visual .basevisual import BaseVisualStim , ContainerMixin , TextureMixin
4242
4343from moviepy .video .io .VideoFileClip import VideoFileClip
4444
5050import pyglet .gl as GL
5151
5252
53- class MovieStim3 (BaseVisualStim , ContainerMixin ):
53+ class MovieStim3 (BaseVisualStim , ContainerMixin , TextureMixin ):
5454 """A stimulus class for playing movies (mpeg, avi, etc...) in PsychoPy
5555 that does not require avbin. Instead it requires the cv2 python package
5656 for OpenCV. The VLC media player also needs to be installed on the
@@ -467,11 +467,8 @@ def _getAudioStreamTime(self):
467467 return self ._audio_stream_clock .getTime ()
468468
469469 def _unload (self ):
470- try :
471- # remove textures from graphics card to prevent crash
472- self .clearTextures ()
473- except Exception :
474- pass
470+ # remove textures from graphics card to prevent crash
471+ self .clearTextures ()
475472 if self ._mov is not None :
476473 self ._mov .close ()
477474 self ._mov = None
You can’t perform that action at this time.
0 commit comments