nobuffer与av_read_frame的关系

简介: nobuffer与av_read_frame的关系

AVDictionary *options = NULL;

av_dict_set(&options, “fflags”, “nobuffer”, 0);

int re = avformat_open_input(&ic, URL, NULL, &options);

av_read_frame在读取视频后,开始解码在最开始几帧avcodec_receive_frame并不会得到解码后的数据,这个函数返回值是AVERROR(EAGAIN)。没有设置nobuffer和设置nobuffer,以上结果都返回AVERROR(EAGAIN)。

但设置了后,av_read_frame不阻塞,直接返回,不设置,av_read_frame会阻塞。不过等过几帧后avcodec_receive_frame正常出数据,av_read_frame和平常一样,也会阻塞直到读到数据才取消阻塞。


thxchtb3wcn3k_d11fc1ff3db9431d8ad7575e9297ae48.png

相关文章
|
4月前
列分Frame
列分Frame。
27 4
|
4月前
行分Frame
行分Frame。
39 3
|
4月前
|
Shell 网络安全 PHP
thewall-文件包含-CAP_DAC_READ_SEARCH
thewall-文件包含-CAP_DAC_READ_SEARCH
41 2
|
5月前
Frame
Frame。
41 1
|
存储
av_register_all分析
av_register_all分析
111 0
av_register_all分析
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
160 0
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
|
网络协议
av_interleaved_write_frame -32 broken pipe
av_interleaved_write_frame -32 broken pipe
325 0
av_interleaved_write_frame -32 broken pipe
|
算法
frame_size (1536) was not respected for a non-last frame
frame_size (1536) was not respected for a non-last frame
122 0
frame_size (1536) was not respected for a non-last frame
av_read_frame每次返回的视频和音频帧数
av_read_frame每次返回的视频和音频帧数
97 0
av_read_frame每次返回的视频和音频帧数
|
索引
av_find_best_stream
av_find_best_stream
164 0
av_find_best_stream