Skip to content

Commit 7dc9eb6

Browse files
committed
Adding TODO for future improvements
1 parent 650adf6 commit 7dc9eb6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/FFmpegReader.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,6 +1875,8 @@ void FFmpegReader::UpdatePTSOffset(bool is_video) {
18751875
// Also, determine if PTS is invalid (too far away from zero)
18761876
// We compare the PTS to the timebase value equal to 1 second (which means the PTS
18771877
// must be within the -1 second to +1 second of zero, otherwise we ignore it)
1878+
// TODO: Please see https://github.com/OpenShot/libopenshot/pull/565#issuecomment-690985272
1879+
// for ideas to improve this logic.
18781880
int64_t max_offset = info.video_timebase.Reciprocal().ToFloat();
18791881
if (video_pts_offset < -max_offset || video_pts_offset > max_offset) {
18801882
// Ignore PTS, it seems invalid
@@ -1892,6 +1894,8 @@ void FFmpegReader::UpdatePTSOffset(bool is_video) {
18921894
// Also, determine if PTS is invalid (too far away from zero)
18931895
// We compare the PTS to the timebase value equal to 1 second (which means the PTS
18941896
// must be within the -1 second to +1 second of zero, otherwise we ignore it)
1897+
// TODO: Please see https://github.com/OpenShot/libopenshot/pull/565#issuecomment-690985272
1898+
// for ideas to improve this logic.
18951899
audio_pts_offset = 0 - packet->pts;
18961900
int64_t max_offset = info.audio_timebase.Reciprocal().ToFloat();
18971901
if (audio_pts_offset < -max_offset || audio_pts_offset > max_offset) {

0 commit comments

Comments
 (0)