提交 27cd40b2 authored 作者: blu's avatar blu

bugfix: correctly handling video streams with extra data

上级 fc0b069d
...@@ -510,6 +510,9 @@ private: ...@@ -510,6 +510,9 @@ private:
if(this->pps != 0 && factor == 0) { if(this->pps != 0 && factor == 0) {
// lock the value // lock the value
factor = int(int(this->pps) / this->detPara.fpsProc); // regulator to 0 if it was set inresonably high factor = int(int(this->pps) / this->detPara.fpsProc); // regulator to 0 if it was set inresonably high
if(factor > 8) {
factor = 8;
}
} }
if(factor != 0 ) { if(factor != 0 ) {
......
...@@ -228,7 +228,7 @@ int encode(AVFormatContext *ctx, char **bytes, vector<int> ids = vector<int>()) ...@@ -228,7 +228,7 @@ int encode(AVFormatContext *ctx, char **bytes, vector<int> ids = vector<int>())
spdlog::info("\t sid: {}", i); spdlog::info("\t sid: {}", i);
} }
for (int i = 0; i < numStreams; i++) for (auto i:ids)
{ {
wholeSize += sizeof(AVStream); wholeSize += sizeof(AVStream);
wholeSize += sizeof(AVCodecParameters); wholeSize += sizeof(AVCodecParameters);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论