<div>I have an app that is using AVIOContext to provide custom IO (through </div><div>an intemediary buffer) to an event driven data stream. </div><div><br></div><div>This works great as long as there is data available to read, however when</div>

<div>the incoming data is runs low, <b>read_frame succeeds</b>, and then the following</div><div><b>decode fails </b>with <b>-1</b> (I have some print statements showing me that it reads </div><div>until there is no data, and then fails.) </div>

<div><br></div><div>Also, while I have set the flags for AVFMT_NON_BLOCK, I do not ever seem</div><div>to get EAGAIN returned.</div><div><br></div><div>Am I able to either,</div><div><br></div><div>1. Determine how much data is required before calling read_frame or decode.</div>

<div>(I am able to wait before calling)?</div><div>2. Get these methods to return EAGAIN when the data runs out instead of </div><div>giving other errors?</div><div>3. Something else to make this work?</div><div><br></div>

<div>Any help would be much appreciated!</div><br clear="all">Thanks<br>Calvin<br>