FFmpeg源码剖析-通用:get_input_packet()

get_input_packet()位于ffmpeg.c

1. 函数概述

调用av_read_frame()函数从文件中读取一个packet, 
对视频来说,一个packet是一帧;
对音频来说,一个packet是多帧;


2. 函数调用图



3. 代码分析

static int get_input_packet(InputFile *f, AVPacket *pkt)
{
    if (f->rate_emu) {
      ...
    }


    return av_read_frame(f->ctx, pkt);
}



猜你喜欢

转载自blog.csdn.net/fireroll/article/details/78016836