音頻解碼 第一步:組冊組件 av_register_all(); 第二步:打開封裝格式->打開文件 avformat_open_input(); 第三步:查找音頻流->拿到音頻信息 avformat_find_stream_info(); 第四步:查找音頻解碼器 查找音頻流索引位置 根據(jù)音頻流索引,獲取解碼器上下文 根據(jù)解碼器上下文,獲得解碼器ID,然后查找解碼器 avcodec_find_decoder(); 第五步:打開音頻解碼器 avcodec_open2(); 第六步:讀取音頻壓縮數(shù)據(jù)->循環(huán)讀取 第七步:音頻解碼 第八步:釋放內(nèi)存資源,關(guān)閉音頻解碼器