<div dir="ltr">I'm writing an application that will be ingesting multiple live streams at once and managing them, and to do this I've been adapting libav with a custom AVIOContext. The custom context is simply reading from an FLV file for testing purposes before I will feed it an RTMP stream. All of this is tested + proven.<div><br></div><div>Everything works fine when only one stream is being ingested, and I'm quite sure I'm going by documentation on this, however when I have multiple streams running at once libav runs into problems reading in packets.</div><div><br></div><div>There is a lot of code to review for this issue I'm having, so I won't bother attaching it all -- but I do have one question concerning the behavior of libav:</div><div><br></div><div><ol><li>Is it possible to read/decode more than one media stream in one single thread? i.e. round-robin each AVFormatContext, calling av_read_frame once, decoding, and moving onto the next packet/frame in this fashion?</li><li>Or, is it possible to achieve the same thing, with each stream being on its own thread (constructing the AVFormatContext, reading input, decoding)?</li></ol><div>In essence, I am looking to decode multiple streams in one process. Hope this is possible, if it is there is likely something wrong with my code</div></div><div><br></div><div>Thanks</div></div>