summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-06 11:44:07 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-06 11:44:07 +0000
commit4e2e24a44857dd6dbd777cd28d851fd792ca3124 (patch)
treed845f4066c99030811a5f44704bc68ca8909a777 /src/lib/ffmpeg_decoder.cc
parentc7763b01172ec854d80199000e9536393806e882 (diff)
Fix mis-timed subtitles with non-zero video PTS offsets.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index 5a1b78762..1546031b8 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -559,7 +559,7 @@ FFmpegDecoder::decode_subtitle_packet ()
/* 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;