Source

pygame / examples / movieplayer.py

Diff from to

File examples/movieplayer.py

 #!/usr/bin/env python
 
+import sys
+import os
+
+if sys.platform == 'win32' and sys.getwindowsversion()[0] >= 5: # condi. and
+    # On NT like Windows versions smpeg video needs windb.
+    os.environ['SDL_VIDEODRIVER'] = 'windib'
+    
 import pygame
 from pygame.locals import *
 
-import sys
 try:
     from cStringIO import StringIO as BytesIO
 except ImportError:
 def main(filepath):
     pygame.init()
     pygame.mixer.quit()
+    pygame.display.init()
 
     f = BytesIO(open(filepath, 'rb').read())
     movie = pygame.movie.Movie(f)