title: Malloc Check Failed when opening video stream
body: <p>I'm writing a BlackBerry 10 application which decodes an H264 video stream (from a Parrot AR Drone) using ffmpeg and libx264. These libraries have both been compiled for BlackBerry QNX. </p>
  
  <p>Here's my code: </p>
  
  <pre><code>av_register_all();
  avcodec_register_all();
  avformat_network_init();
  
  printf("AV setup complete\n");
  
  const char* drone_addr = "http://192.168.1.1:5555";
  AVFormatContext* pFormatCtx = NULL;
  AVInputFormat* pInputFormat = av_find_input_format("H264");
  
  printf("Opening video feed from drone\n");
  
  //THIS LINE FAILS 
  int result = avformat_open_input(&amp;pFormatCtx, drone_addr, pInputFormat, NULL); 
  </code></pre>
  
  <p>The last line fails with the error: </p>
  
  <pre><code>Malloc Check Failed: :../../dlist.c:1168
  </code></pre>
  
  <p>How can I fix this error or debug it further? </p>
  
  <p><em>Update</em>: The error only occurs when I supply <code>pInputFormat</code> to <code>avformat_open_input</code>. If I supply NULL I don't get an error. But for my app I must supply this parameter since it is not possible for ffmpeg to determine the video format from the feed alone.  </p>