[音视频] 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的问题

相关文章
|
6月前
|
消息中间件 C语言
zframe_send发送的内容,可以使用zmq_recv接收吗
如果你在同一套接字上混合使用CZMQ的zframe_send和ZMQ的zmq_recv,可能会遇到问题,因为这两个函数可能对ZMQ的内部状态有不同的预期。
41 0
|
9月前
srt报错:No room to store incoming packet seqno
srt报错:No room to store incoming packet seqno
106 0
srt报错:No room to store incoming packet seqno
|
9月前
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
54 0
ffmpeg编码报错:more samples than frame size (avcodec_encode_audio2)
|
9月前
|
缓存 编解码 Ubuntu
avcodec_send_frame和avcodec_receive_packet
avcodec_send_frame和avcodec_receive_packet
184 0
avcodec_send_frame和avcodec_receive_packet
|
容器
FFmpeg读取文件内容AVPacket
FFmpeg读取文件内容AVPacket
181 0
|
存储 编解码 Android开发
【Android FFMPEG 开发】FFMPEG 读取音视频流中的数据到 AVPacket ( 初始化 AVPacket 数据 | 读取 AVPacket )
【Android FFMPEG 开发】FFMPEG 读取音视频流中的数据到 AVPacket ( 初始化 AVPacket 数据 | 读取 AVPacket )
213 0
|
存储 编解码 Android开发
【Android FFMPEG 开发】FFMPEG 解码 AVPacket 数据到 AVFrame ( AVPacket->解码器 | 初始化 AVFrame | 解码为 AVFrame 数据 )
【Android FFMPEG 开发】FFMPEG 解码 AVPacket 数据到 AVFrame ( AVPacket->解码器 | 初始化 AVFrame | 解码为 AVFrame 数据 )
260 0