title: Play video file with broken AVI index on iOS using MobileVLCKit
body: <p>I'm working on a video streaming app for iOS, and I faced up with a problem - the app should be able to play partially downloaded videos. I can't stream video directly from a server because there is no server, videos are downloaded using P2P network. Download starts from the beginning of the file and after about 20% I want to be able to play the file. </p>
  
  <p>Currently I'm trying to use <code>MobileVLCKit</code>. When I try to play a partially downloaded file (about 30%) using VLC player on my Mac, VLC tells me: "<em>Broken or missing AVI Index</em>" and offers to "<em>Play as is</em>" or "<em>Build index and than play</em>", when I choose "<em>Play as is</em>" video starts playing, but on iOS when I try to play the same video I get <code>BAD_ACCESS</code> when <code>MobileVLCKit</code> invoke <code>AVI_IndexCreate</code>. Is there a way to force <code>MobileVLCKit</code> to play video "as is" with a broken index, or maybe there are some other options how I can to this? Thanks a lot.</p>
  
  <p>UPDATE: </p>
  
  <p>console output:</p>
  
  <pre><code>[1389:617849] creating player instance using shared library
  [1759f504] core generic error: option marq-color does not exist
  [1759f504] core generic error: option marq-opacity does not exist
  [1759f504] core generic error: option marq-position does not exist
  [1759f504] core generic error: option marq-refresh does not exist
  [1759f504] core generic error: option marq-size does not exist
  [1759f504] core generic error: option marq-timeout does not exist
  [1759f504] core generic error: option marq-x does not exist
  [1759f504] core generic error: option marq-y does not exist
  [176f8264] avi demux error: no key frame set for track 0
  [176f8264] avi demux error: no key frame set for track 1
  </code></pre>
  
  <p>backtrace:</p>
  
  <pre><code>(lldb) bt
  * thread #8: tid = 0x976f9, 0x20000000, stop reason = EXC_BAD_ACCESS (code=1, address=0x20000000)
      frame #0: 0x20000000
    * frame #1: 0x00675d72 testApp'Open [inlined] AVI_IndexCreate + 542 at avi.c:2407
      frame #2: 0x00675b54 testApp'Open(p_this=&lt;unavailable&gt;) + 5228 at avi.c:631
      frame #3: 0x0065111e testApp'vlc_module_load [inlined] module_load(obj=&lt;unavailable&gt;, init=&lt;unavailable&gt;, args=0x04d29d94, args=0x04d29d94, args=&lt;unavailable&gt;) + 814 at modules.c:185
      frame #4: 0x00651100 testApp'vlc_module_load(obj=0x155f7654, capability=0x008fdd2e, name=&lt;unavailable&gt;, strict=false, probe=&lt;unavailable&gt;) + 784 at modules.c:277
      frame #5: 0x0065129a testApp'module_need(obj=&lt;unavailable&gt;, cap=&lt;unavailable&gt;, name=&lt;unavailable&gt;, strict=&lt;unavailable&gt;) + 30 at modules.c:366
      frame #6: 0x0062ae9a testApp'demux_New + 734
      frame #7: 0x00634a4c testApp'InputSourceInit + 2624
      frame #8: 0x00631e74 testApp'Init + 580
      frame #9: 0x00633c7a testApp'Run + 18
      frame #10: 0x35542e92 libsystem_pthread.dylib'_pthread_body + 138
      frame #11: 0x35542e06 libsystem_pthread.dylib'_pthread_start + 118
  </code></pre>