title: FFMpeg on iOS Swift
body: <p>I'm trying to learn FFMpeg through this tutorial: <a href="http://dranger.com/ffmpeg/tutorial01.html" rel="noreferrer">http://dranger.com/ffmpeg/tutorial01.html</a></p>
  
  <p>I was hoping that just translating the C code to swift should get me up and running but I guess I was mistaken</p>
  
  <p>I tried converting the following code:</p>
  
  <pre><code>AVFormatContext *pFormatCtx = NULL;
  // Open video file
  if(avformat_open_input(&amp;pFormatCtx, argv[1], NULL, 0, NULL)!=0) {}
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>let pFormatCtx : UnsafeMutablePointer&lt;UnsafeMutablePointer&lt;AVFormatContext&gt;&gt; = nil
  // Open video file
  if avformat_open_input(pFormatCtx, path, nil, opaque) != 0 {}
  </code></pre>
  
  <p>This code breaks at: <strong>if avformat_open_input(pFormatCtx, path, nil, opaque) != 0 {}</strong> With an <strong>EXC_BAD_ACCESS</strong> error</p>
  
  <p>can anyone guess whats wrong here??</p>
  
  <p>By the way I have the FFMpeg library compiling without an issue so I don't think there might be an issue with the way I compiled or imported it. I'm probably passing wrong arguments I think :/ Any guesses??</p>