[FFmpeg-cvslog] ffmpeg: Do not clip timestamps at LONG_MAX.

Carl Eugen Hoyos git at videolan.org
Wed Apr 15 21:00:01 EEST 2020


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Mon Apr 13 14:01:14 2020 +0200| [d5bf704f507d75d3ca996703440b51a68b87d5ba] | committer: Carl Eugen Hoyos

ffmpeg: Do not clip timestamps at LONG_MAX.

Fixes ticket #8612.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d5bf704f507d75d3ca996703440b51a68b87d5ba
---

 fftools/ffmpeg.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 0578265c1e..d896b14a14 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1147,7 +1147,7 @@ static void do_video_out(OutputFile *of,
                 av_log(NULL, AV_LOG_DEBUG, "Not duplicating %d initial frames\n", (int)lrintf(delta0));
                 delta = duration;
                 delta0 = 0;
-                ost->sync_opts = lrint(sync_ipts);
+                ost->sync_opts = llrint(sync_ipts);
             }
         case VSYNC_CFR:
             // FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c
@@ -1158,18 +1158,18 @@ static void do_video_out(OutputFile *of,
             else if (delta > 1.1) {
                 nb_frames = lrintf(delta);
                 if (delta0 > 1.1)
-                    nb0_frames = lrintf(delta0 - 0.6);
+                    nb0_frames = llrintf(delta0 - 0.6);
             }
             break;
         case VSYNC_VFR:
             if (delta <= -0.6)
                 nb_frames = 0;
             else if (delta > 0.6)
-                ost->sync_opts = lrint(sync_ipts);
+                ost->sync_opts = llrint(sync_ipts);
             break;
         case VSYNC_DROP:
         case VSYNC_PASSTHROUGH:
-            ost->sync_opts = lrint(sync_ipts);
+            ost->sync_opts = llrint(sync_ipts);
             break;
         default:
             av_assert0(0);



More information about the ffmpeg-cvslog mailing list