File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff 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) {
You can’t perform that action at this time.
0 commit comments