title: QuickTime API fails with error 2048
body: <p>I have trouble with QuickTime API on MacOS 10.7.2(b.11C74).</p>
  
  <p>Here is a piece of <a href="http://openframeworks.cc" rel="nofollow noreferrer">openFrameworks</a> code which opens a movie descriptor:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>// ofQuickTimePlayer.cpp
  bool createMovieFromURL(string urlIn,  Movie &amp;movie){
      char * url = (char *)urlIn.c_str();
      Handle urlDataRef;
      OSErr err;
      urlDataRef = NewHandle(strlen(url) + 1);
      // ...
      BlockMoveData(url, *urlDataRef, strlen(url) + 1);
      err = NewMovieFromDataRef(
          &amp;movie, 
          newMovieActive, 
          nil, 
          urlDataRef, 
          URLDataHandlerSubType);
      // ...
      if ( err != noErr ) {
         ofLog(OF_LOG_ERROR,"createMovieFromURL: error loading url");
         return false;
      } else {
         return true;
      }
  }
  </code></pre>
  
  <p>All I need is just to open HLS video stream.</p>
  
  <p>Testing the Apple HLS stream doesn't fail to load but no video is rendered. 
  Here it is: <a href="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8" rel="nofollow noreferrer">http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8</a></p>
  
  <p>My test HLS stream fails to load and err equals <code>-2048</code> in this case.</p>
  
  <p>Everything works perfectly with .mp4 transferred by HTTP and with RTSP protocol.</p>
  
  <p>Same streams play perfectly in QuickTime Player 10.1 (501.5).</p>
  
  <p>Details of my tiny research are here: <a href="https://github.com/openframeworks/openFrameworks/issues/897" rel="nofollow noreferrer">https://github.com/openframeworks/openFrameworks/issues/897</a></p>
  
  <p>So my questions are:</p>
  
  <ol>
  <li>What is the cause of this strange behavior?</li>
  <li>How to fix it?</li>
  </ol>