avformat_find_stream_info探测流格式信息

时间:2017-10-24 01:15:46   收藏:0   阅读:738

代码


AVDictionary* pOptions = NULL;

handle->pFormatContext->probesize = 100 *1024;

handle->pFormatContext->max_analyze_duration = 5 * AV_TIME_BASE;

if (avformat_find_stream_info(handle->pFormatContext, &pOptions) < 0)


说明


这样设置probesize和max_analyze_duration是可以减少探测时间,但是是以牺牲成功率为代价的,有时候探测不到流信息,就会播不出来,

出现在网络丢包的情况下(使用UDP进行视频数据的传输)或者网路特别复杂,跨越多个网段

http://blog.csdn.net/u011913612/article/details/53642355详细描述探测流格式信息的过程



摘自

http://blog.csdn.net/itpeng523/article/details/38581301


原文:http://fengyuzaitu.blog.51cto.com/5218690/1975295

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!