Skip to content

Commit 8d9bd86

Browse files
committed
Improve h264 in avi hack to also handle duration = number of frames * 2 because maybe field based stuff does this or whatever
1 parent 1c19c98 commit 8d9bd86

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/videosource.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,10 @@ bool BestVideoSource::IndexTrack(const ProgressFunction &Progress) {
11011101
// It's CFR so we know every frame duration is 1 unit
11021102
for (size_t i = 0; i < TrackIndex.Frames.size(); i++)
11031103
TrackIndex.Frames[i].PTS = i;
1104+
} else if (VP.Duration == TrackIndex.Frames.size() * 2) {
1105+
// It's with 99.99% certainty CFR so we almost know every frame duration is 2 units
1106+
for (size_t i = 0; i < TrackIndex.Frames.size(); i++)
1107+
TrackIndex.Frames[i].PTS = i * 2;
11041108
}
11051109
}
11061110

0 commit comments

Comments
 (0)