Merge pull request #622 from justdan96/jcdr428-correctFPS

Take sub fps from video even when video is not selected
master
jcdr428 2022-07-05 21:08:10 +01:00 committed by GitHub
commit fafc3cd747
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 12 deletions

View File

@ -1747,19 +1747,16 @@ QString TsMuxerWindow::getSrtParams()
for (int i = 0; i < ui->trackLV->rowCount(); ++i)
{
if (ui->trackLV->item(i, 0)->checkState() == Qt::Checked)
{
auto codecInfo = getCodecInfo(i);
if (!codecInfo)
continue;
auto codecInfo = getCodecInfo(i);
if (!codecInfo)
continue;
if (isVideoCodec(codecInfo->displayName))
{
rez += QString(",video-width=") + QString::number(codecInfo->width);
rez += QString(",video-height=") + QString::number(codecInfo->height);
rez += QString(",fps=") + fpsTextToFpsStr(codecInfo->fpsText);
return rez;
}
if (isVideoCodec(codecInfo->displayName))
{
rez += QString(",video-width=") + QString::number(std::min(codecInfo->width, 1920));
rez += QString(",video-height=") + QString::number(std::min(codecInfo->height, 1080));
rez += QString(",fps=") + fpsTextToFpsStr(codecInfo->fpsText);
return rez;
}
}
rez += ",video-width=1920,video-height=1080,fps=23.976";