其他分享
首页 > 其他分享> > FFmpeg源代码:avcodec_receive_frame

FFmpeg源代码:avcodec_receive_frame

作者:互联网

avcodec_receive_frame() 函数的主要功能是从解码队列中取出一帧

avcodec_receive_frame()的声明位于ffmpeg/libavcodec/avcodec.h , 如下:


/**
 * Return decoded output data from a decoder.
 *
 * @param avctx codec context
 * @param frame This will be set to a reference-counted video or audio
 *              frame (depending on the decoder type) allocated by the
 *              decoder. Note that the function will always call
 *              av_frame_unref(frame) before doing anything else.
 *
 * @return
 *      0:                 success, a frame was returned
 *      AVERROR(EAGAIN):   output is not available in this state - user must try
 *                         to send new input
 *      AVERROR_EOF:       the decoder has been fully flushed, and there will be
 *                         no more output frames
 *      AVERROR(EINVAL):   codec not opened, or it is an enco

标签:AVERROR,receive,avcodec,will,decoder,源代码,frame
来源: https://blog.csdn.net/ai2000ai/article/details/122497558