[Libav-user] how to set timeout in rtmp plugin to avoid indefinite waiting?
qw
applemax82 at 163.com
Thu Oct 27 14:01:25 EEST 2016
Hi,
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:
static int decodeInterruptCb(void *p)
{
return 1;
}
AVFormatContext *pIfmtCtx;
pIfmtCtx->flags |= AVFMT_FLAG_NONBLOCK;
pIfmtCtx->interrupt_callback.callback = decodeInterruptCb;
pIfmtCtx->interrupt_callback.opaque = NULL;
avformat_open_input(&pIfmtCtx, pInRtmpUrl, NULL, NULL);
callback function is set that intends to return immediately, Why avformat_open_input() still waits for indefinite time?
Is there something wrong with the usage of ffmpeg lib?
Thanks!
Regards
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20161027/d3985760/attachment.html>
More information about the Libav-user
mailing list