没有使用 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的问题