title: dismissModalViewController not working when there is no internet connection MPMoviePlayerViewController
body: <p>I have MPMoviePlayerViewController that I call using <code>presentModalViewController:animated:</code>. When there is an error (no internet connection) I want to dismiss it. However, <code>dismissModalViewController</code> seems to not work in this case.</p>
  
  <pre><code>- (void)movieFinishedCallback:(NSNotification*)aNotification
  {      
       NSLog(@"MOVIE FINISH CALL");
  
      // Obtain the reason why the movie playback finished
      NSNumber *finishReason = [[aNotification userInfo] objectForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey];    
      // Dismiss the view controller ONLY when the reason is not "playback ended"
  
      if ([finishReason intValue] != MPMovieFinishReasonPlaybackEnded)
      {     
  
          NSlog(@"Check go here");
          MPMoviePlayerController *moviePlayer = [aNotification object];     
          [[NSNotificationCenter defaultCenter] removeObserver:self
                                                          name:MPMoviePlayerPlaybackDidFinishNotification
                                                        object:moviePlayer];        
          [self dismissModalViewControllerAnimated:YES];
      }
      else{
          [self dismissModalViewControllerAnimated:YES];        
      }
  }
  
  
  
  - (void)playPodcastRadio:(NSString *) urlRadio
  {
       // Initialize the movie player view controller with a video URL string
  
      MPMoviePlayerViewController* mediaPlayer = [[MPMoviePlayerViewController alloc]initWithContentURL:[NSURL URLWithString:urlRadio]];
      mediaPlayer.moviePlayer.movieSourceType = MPMovieSourceTypeUnknown; 
  
      [[NSNotificationCenter defaultCenter] removeObserver:mediaPlayer name:MPMoviePlayerPlaybackDidFinishNotification object:mediaPlayer.moviePlayer];
  
      // Register this class as an observer instead    
      [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification  object:mediaPlayer.moviePlayer];
  
      mediaPlayer.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
      // Present the movie player view controller    
      [self presentModalViewController:mediaPlayer animated:YES];
  
      [mediaPlayer.moviePlayer prepareToPlay];
      [mediaPlayer.moviePlayer play];
  }
  </code></pre>
  
  <p>The notification handler is called and reaches the <code>Check go here</code> log. But it does not dismiss the modalViewController.
  Anyone can help me?</p>
  
  <p>Thank You</p>
  
  <p>It happens on iOS 4.3 and iOs 5</p>