[音视频] avcodec_send_packet 返回-22

简介: [音视频] avcodec_send_packet 返回-22

没有使用 avcodec_open2 打开编解码器

* @retval 0                 success
 * @retval AVERROR(EAGAIN)   input is not accepted in the current state - user
 *                           must read output with avcodec_receive_frame() (once
 *                           all output is read, the packet should be resent,
 *                           and the call will not fail with EAGAIN).
 * @retval AVERROR_EOF       the decoder has been flushed, and no new packets can be
 *                           sent to it (also returned if more than 1 flush
 *                           packet is sent)
 * @retval AVERROR(EINVAL)   codec not opened, it is an encoder, or requires flush
 * @retval AVERROR(ENOMEM)   failed to add packet to internal queue, or similar
 * @retval "another negative error code" legitimate decoding errors
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt);

记录一下忘记写avcodec_open2的问题

相关文章
|
5月前
|
消息中间件 C语言
zframe_send发送的内容,可以使用zmq_recv接收吗
如果你在同一套接字上混合使用CZMQ的zframe_send和ZMQ的zmq_recv,可能会遇到问题,因为这两个函数可能对ZMQ的内部状态有不同的预期。
40 0
|
1月前
|
编解码 算法 C++
【ffmpeg 基础函数】详解FFmpeg中的av_packet_ref函数
【ffmpeg 基础函数】详解FFmpeg中的av_packet_ref函数
21 0
|
8月前
srt报错:No room to store incoming packet seqno
srt报错:No room to store incoming packet seqno
99 0
srt报错:No room to store incoming packet seqno
|
8月前
|
缓存 编解码 Ubuntu
avcodec_send_frame和avcodec_receive_packet
avcodec_send_frame和avcodec_receive_packet
161 0
avcodec_send_frame和avcodec_receive_packet
|
8月前
|
索引
av_find_best_stream
av_find_best_stream
68 0
av_find_best_stream
|
容器
FFmpeg读取文件内容AVPacket
FFmpeg读取文件内容AVPacket
178 0
|
存储 编解码 Android开发
【Android FFMPEG 开发】FFMPEG 读取音视频流中的数据到 AVPacket ( 初始化 AVPacket 数据 | 读取 AVPacket )
【Android FFMPEG 开发】FFMPEG 读取音视频流中的数据到 AVPacket ( 初始化 AVPacket 数据 | 读取 AVPacket )
209 0
|
存储 编解码 Android开发
【Android FFMPEG 开发】FFMPEG 解码 AVPacket 数据到 AVFrame ( AVPacket->解码器 | 初始化 AVFrame | 解码为 AVFrame 数据 )
【Android FFMPEG 开发】FFMPEG 解码 AVPacket 数据到 AVFrame ( AVPacket->解码器 | 初始化 AVFrame | 解码为 AVFrame 数据 )
257 0