title: Read audio from an http stream in iOS
body: <p>I need to read the audio part of an http stream. I've compiled ffmpeg for armv7, armv7s and i386 and added the lib and headers in my xcode project. I'm now kind of stuck on the usage of libav in iOS.<br>
  I've tested the following code (just to see if the basis is working)</p>
  
  <pre><code>#import &lt;libavformat/avformat.h&gt;
  #import &lt;libavcodec/avcodec.h&gt;
  
  -(void)test{
    av_register_all();
  
    AVFormatContext *pFormatCtx;
    const char      *filename="http://domain.tld/stream.wmv";
  
    // Testing how to opening a file
    if(av_open_input_file(&amp;pFormatCtx, filename, NULL, 0, NULL)!=0)
      handle_error(); // Couldn't open file
  
  
    // Handle the AudioQueue
    // ...
  }
  </code></pre>
  
  <p>But this does not compile...</p>
  
  <p>I'm very new to ffmpeg on iOS, what is the way to play the sound of the http stream ? </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The simulator crashes with the following stacktrace:</p>
  
  <pre><code>0 av_probe_input_buffer
  1 avformat_open_input
  ...
  </code></pre>