2014-01-06 Carl Hetherington <cth@carlh.net>
+ * Fix mis-timed subtitles when there is a non-zero video PTS offset.
+
* Remove seemingly unnecessary checks on image directories.
* Leave DCP directory creation until the last minute to help
/* Subtitle PTS in seconds (within the source, not taking into account any of the
source that we may have chopped off for the DCP)
*/
- double const packet_time = static_cast<double> (sub.pts) / AV_TIME_BASE;
+ double const packet_time = (static_cast<double> (sub.pts ) / AV_TIME_BASE) + _video_pts_offset;
/* hence start time for this sub */
Time const from = (packet_time + (double (sub.start_display_time) / 1e3)) * TIME_HZ;