@@ -1603,12 +1603,12 @@ void FileInformation::makeMkvReport(QString exportFileName, QByteArray attachmen
1603
1603
FFmpegVideoEncoder::Metadata streamMetadata;
1604
1604
streamMetadata << FFmpegVideoEncoder::MetadataEntry (QString (" title" ), QString (" Frame Thumbnails" ));
1605
1605
1606
- auto timeBase = QString::fromStdString (streamsStats->getStreams (). begin ()-> get ()-> getTime_base ());
1606
+ auto timeBase = streamsStats-> getReferenceStream () ? QString::fromStdString (streamsStats->getReferenceStream ()-> getTime_base ()) : QString ( " 1/25 " );
1607
1607
auto timeBaseSplitted = timeBase.split (" /" );
1608
1608
int num = timeBaseSplitted[0 ].toInt ();
1609
1609
int den = timeBaseSplitted[1 ].toInt ();
1610
1610
1611
- auto codecTimeBase = QString::fromStdString (streamsStats->getStreams (). begin ()-> get ()-> getCodec_Time_Base ());
1611
+ auto codecTimeBase = streamsStats-> getReferenceStream () ? QString::fromStdString (streamsStats->getReferenceStream ()-> getCodec_Time_Base ()) : QString ( " 0/1 " );
1612
1612
auto codecTimeBaseSplitted = codecTimeBase.split (" /" );
1613
1613
int codecNum = codecTimeBaseSplitted[0 ].toInt ();
1614
1614
int codecDen = codecTimeBaseSplitted[1 ].toInt ();
@@ -1706,12 +1706,12 @@ void FileInformation::makeMkvReport(QString exportFileName, QByteArray attachmen
1706
1706
panelSource.height = panelSize ().height ();
1707
1707
1708
1708
// 2do: take related stream instead of first one
1709
- auto timeBase = QString::fromStdString (streamsStats->getStreams (). begin ()-> get ()-> getTime_base ());
1709
+ auto timeBase = streamsStats-> getReferenceStream () ? QString::fromStdString (streamsStats->getReferenceStream ()-> getTime_base ()) : QString ( " 1/25 " );
1710
1710
auto timeBaseSplitted = timeBase.split (" /" );
1711
1711
int num = timeBaseSplitted[0 ].toInt ();
1712
1712
int den = timeBaseSplitted[1 ].toInt ();
1713
1713
1714
- auto codecTimeBase = QString::fromStdString (streamsStats->getStreams (). begin ()-> get ()-> getCodec_Time_Base ());
1714
+ auto codecTimeBase = streamsStats-> getReferenceStream () ? QString::fromStdString (streamsStats->getReferenceStream ()-> getCodec_Time_Base ()) : QString ( " 0/1 " );
1715
1715
auto codecTimeBaseSplitted = codecTimeBase.split (" /" );
1716
1716
int codecNum = codecTimeBaseSplitted[0 ].toInt ();
1717
1717
int codecDen = codecTimeBaseSplitted[1 ].toInt ();
0 commit comments