title: pygame play many movies
body: <p>i'm trying to play few videos.
  And got error:</p>
  
  <blockquote>
    <p>python2.6: ../../src/xcb_io.c:183: process_responses: Assertion `!(req
    &amp;&amp; current_request &amp;&amp; !(((long) (req->sequence) - (long)
    (current_request)) &lt;= 0))' failed.</p>
  </blockquote>
  
  <p>I think some error in threads, and pygame movie player.</p>
  
  <p>In documentation on pygame wrote:</p>
  
  <blockquote>
    <p>The video overlay planes are drawn on top of everything in the display
    window. To draw the movie as normal graphics into the display window,
    create an offscreen Surface and set that as the movie target. Then
    once per frame blit that surface to the screen</p>
  </blockquote>
  
  <p>Could give me example anybody?</p>
  
  <pre><code>pygame.init()
  screen = pygame.display.set_mode((1024, 768))
  background = pygame.Surface((1024, 768))
  
  screen.blit(background, (0, 0))
  pygame.display.update()
  
  movie = pygame.movie.Movie('media/video.mpg')
  mrect = pygame.Rect(0,0,140,113)
  movie.set_display(screen, mrect.move(65, 150))
  movie.set_volume(0)
  movie.play()
  
  mrect2 = pygame.Rect(0,0,140,113)
  movie2 = pygame.movie.Movie('media/video2.mpg')
  movie2.set_display(screen, mrect2.move(350, 150))
  movie2.set_volume(0)
  movie2.play()
  </code></pre>