title: MPMoviePlayerViewController play from NSData (MP4)
body: <pre><code>NSString *p = [app getFilePathFor:name];
  // Printing description of p:
  // /Users/Jackson/Library/Application Support/iPhone Simulator/5.0/Applications/7FE97EDD-D080-4E5E-8EDD-3D9FFA8F6CF5/Documents/6681a4d7-8630-4a12-90c6-f95d72650a42
  
  NSData *data = [NSData dataWithContentsOfFile:p];
  // Printing description of data:
  // &lt;01401dc2 a15ebc27 e473ee79 316568ff 19dc7000 df3f7c5c dc206870 01a1c00e 00010000 00000000 00e10288 00000003 01060020 08c80038 00080000 88edffbf 02000119 0000050e 00000000 00000000 02000007 0000050f 00000000 00000000&gt;
  
  NSString *str = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
  // Printing description of str:
  // @Â¡^¼'äsîy1ehÿÜp
  
  path = [NSURL fileURLWithPath:str];
  // Printing description of path:
  // %01@%1D%C3%82%C2%A1%5E%C2%BC'%C3%A4s%C3%AEy1eh%C3%BF%19%C3%9Cp%00%C3%9F%3F%7C%5C%C3%9C%20hp%01%C2%A1%C3%80%0E%00%01%00%00%00%00%00%00%00%C3%A1%02%C2%88%00%00%00%03%01%06%00%20%08%C3%88%008%00%08%00%00%C2%88%C3%AD%C3%BF%C2%BF%02%00%01%19%00%00%05%0E%00%00%00%00%00%00%00%00%02%00%00%07%00%00%05%0F%00%00%00%00%00%00%00%00 -- file://localhost/
  </code></pre>
  
  <p>Then I send the path to the MPMoviePlayerViewController like so:</p>
  
  <pre><code>MPMoviePlayerViewController * playerController = [[MPMoviePlayerViewController alloc] initWithContentURL:path];
  
  [self presentMoviePlayerViewControllerAnimated:(MPMoviePlayerViewController *)playerController];
  
  playerController.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
  [playerController.moviePlayer play];
  playerController=nil;
  </code></pre>
  
  <p>At this point, the Movie Player shows, then immediate hides once the "show" animation is complete. In the log I get this:</p>
  
  <pre><code>An instance 0x87ca7b0 of class AVPlayerItem was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info:
  &lt;NSKeyValueObservationInfo 0x87dfc30&gt; (
  &lt;NSKeyValueObservance 0x933c280: Observer: 0x93367d0, Key path: nonForcedSubtitleDisplayEnabled, Options: &lt;New: YES, Old: NO, Prior: NO&gt; Context: 0x0, Property: 0x933c630&gt;
  &lt;NSKeyValueObservance 0x933c360: Observer: 0x93356b0, Key path: presentationSize, Options: &lt;New: NO, Old: NO, Prior: NO&gt; Context: 0x0, Property: 0x87b53b0&gt;
  </code></pre>
  
  <p>I have no idea where to go next.. <em>help?</em></p>
  
  <p>** EDIT **</p>
  
  <p>the MP4 I'm trying to play is coming from <a href="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" rel="nofollow">this buckbunny test clip</a>. When I load the clip straight in form the URL it works. But if I download it and save it via NSData and try to reopen the NSData this no longer works.</p>
  
  <p>** EDIT 2 **</p>
  
  <p>@Till: "You are initializing a URL with a string that is garbledegock; <code>// str=@"@Â¡^¼'äsîy1ehÿÜp" path = [NSURL fileURLWithPath:str];</code> What are you expecting here?"</p>
  
  <p>So now that I've tried:</p>
  
  <pre><code>path = [NSURL fileURLWithPath:[app getFilePathFor:name]];
  // Printing description of path:
  // file://localhost/Users/Jackson/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/CB1CA8D0-B5EC-4B5F-8C7F-0EF449508BA7/Documents/9d425856-14b0-4ad3-835a-970affacb05f
  </code></pre>
  
  <p>I'm still getting the EXACT same error.</p>