吐槽一下百度的英文搜索,简直是狗屎!还我大谷哥!
最近用ffmpeg解码udp传输的视频流,经常会碰到提示缓存不足的错误。由于不太清楚具体代码在什么位置,没去翻代码。

bing搜索后,在stackoverflow找到了相关解释,原文地址:http://stackoverflow.com/questions/16944024/udp-streaming-with-ffmpeg-overrun-nonfatal-option
源代码地址:http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/udp.c;h=5b5c7cb7dfc1aed3f71ea0c3e980be54757d3c62;hb=dd0a9b78db0eeea72183bd3f5bc5fe51a5d3f537
具体内容:
The same option works from command line or C++ libraries, you need to modify your UDP URL as follows: If you original URL looks like this:
Add the fifo_size and overrun parameters like this:
Remember to escape the URL with quotes.
overrun_nonfatal=1 prevents ffmpeg from exiting, it can recover in most circumstances.
fifo_size=50000000 uses a 50MB udp input buffer (default 5MB)
即,ffmpeg在接收网络协议流时可以在链接上通过fifo_size进行缓冲大小的设置