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
上一篇:Python面向对象的编程思想(一):封装继承多态


下一篇:串口通信之————USART