<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi,</div><div><br></div><div>ffmpeg 2.8.6 is used to develop application, which reads rtmp stream and does some video processing. 'AVIOInterruptCB interrupt_callback' is used to avoid indefinite waiting if there is no avpackets in network. But it doesn't work, and avformat_open_input() waits forever. My source code is shown as follows:</div><div><br></div><div><div>static int decodeInterruptCb(void *p)</div><div>{</div><div>    return 1;</div><div>}</div></div><div><br></div><div>AVFormatContext *pIfmtCtx;</div><div><div>pIfmtCtx->flags |= AVFMT_FLAG_NONBLOCK;</div><div>pIfmtCtx->interrupt_callback.callback = decodeInterruptCb;</div><div>pIfmtCtx->interrupt_callback.opaque = NULL;</div></div><div><br></div><div>avformat_open_input(&pIfmtCtx, pInRtmpUrl, NULL, NULL);</div><div><br></div><div>callback function is set that intends to return immediately, Why avformat_open_input() still waits for indefinite time?</div><div><br></div><div>Is there something wrong with the usage of ffmpeg lib?</div><div><br></div><div>Thanks!</div><div><br></div><div>Regards</div><div><br></div><div>Andrew</div><div><br></div><div><br></div></div><br><br><span title="neteasefooter"><p> </p></span>