Fix error in previous.
authorCarl Hetherington <cth@carlh.net>
Sat, 26 Sep 2015 23:40:52 +0000 (00:40 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 26 Sep 2015 23:40:52 +0000 (00:40 +0100)
src/lib/ffmpeg.cc

index de08e9df9394a5c6bea3b34b2eca4eebc40b9dda..9d5aa92eca3d3f36f2e04c3e6c05ca5737a97ba0 100644 (file)
@@ -314,7 +314,8 @@ FFmpeg::pts_offset (vector<shared_ptr<FFmpegAudioStream> > audio_streams, option
 
        /* Now adjust so that the video pts starts on a frame */
        if (first_video) {
-               po += first_video.get().round_up (video_frame_rate) - first_video.get();
+               ContentTime fvc = first_video.get() + po;
+               po += fvc.round_up (video_frame_rate) - fvc;
        }
 
        return po;