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

相关文章
|
8月前
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
51 0
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
|
8月前
|
存储
av_register_all分析
av_register_all分析
52 0
av_register_all分析
|
8月前
|
编解码
av_read_frame返回值为-5 Input/output error
av_read_frame返回值为-5 Input/output error
85 0
|
8月前
|
网络协议
av_interleaved_write_frame -32 broken pipe
av_interleaved_write_frame -32 broken pipe
128 0
av_interleaved_write_frame -32 broken pipe
|
8月前
|
算法
frame_size (1536) was not respected for a non-last frame
frame_size (1536) was not respected for a non-last frame
60 0
frame_size (1536) was not respected for a non-last frame
|
8月前
av_read_frame每次返回的视频和音频帧数
av_read_frame每次返回的视频和音频帧数
38 0
av_read_frame每次返回的视频和音频帧数
|
8月前
|
索引
av_find_best_stream
av_find_best_stream
68 0
av_find_best_stream
|
8月前
|
缓存 编解码 Ubuntu
avcodec_send_frame和avcodec_receive_packet
avcodec_send_frame和avcodec_receive_packet
162 0
avcodec_send_frame和avcodec_receive_packet
解决办法:av_interleaved_write_frame()返回-22 错误
解决办法:av_interleaved_write_frame()返回-22 错误
89 0

热门文章

最新文章