Track新增update方法,支持更新宽高采样率等信息 (#2960)

当变分辨率时候,实时更新MP4封装层的参数信息,避免出现封装层与编码(SPS)层视频宽高不一样,造成解码参数错误花屏;同时也支持更新音频采样率等信息。


---------

Co-authored-by: xia-chu <771730766@qq.com>
This commit is contained in:
fruit Juice
2023-11-07 23:36:41 +08:00
committed by GitHub
parent 77b3c4312e
commit 1609fe67d7
11 changed files with 75 additions and 44 deletions

View File

@@ -144,6 +144,10 @@ bool H265Track::inputFrame_l(const Frame::Ptr &frame) {
return ret;
}
bool H265Track::update() {
return getHEVCInfo(_vps, _sps, _width, _height, _fps);
}
void H265Track::onReady() {
if (!getHEVCInfo(_vps, _sps, _width, _height, _fps)) {
_vps.clear();