title: ffmpeg decode multiple streams at same time
body: <p>I am using ffmpeg to decode a file and play it back on an android device.  I have this working and would now like to decode two streams at the same time.  I have read some comments regarding needing to use av_lockmgr_register() call with ffmpeg, unfortunately I am not sure how to use these and how the flow would work when using these locks.</p>
  
  <p>Currently I have seperate threads on the java side making requests through JNI to native code that is communicating with ffmpeg.  </p>
  
  <p>Do the threads need to be on the native(NDK) side, or can I manage them on the java side?  And do I need to do any locking, and if so how does that work with ffmpeg?</p>
  
  <p>***UPDATE
  I have this working now, it appears that setting up the threads at the java sdk level transfers into separate threads at the native level.  With that I was able to create a struct with my variables, and then pass a variable to the native layer to specify what struct to use for each video.  So for I have needed to use any mutexs or locks at the native level, and haven't had any issues.  </p>
  
  <p>Does anyone know of potential gotchas I may encounter by not doing so with ffmpeg?</p>