summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-09-12 22:43:52 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-13 01:22:00 +0200
commit60450bd93af0b331d7b98c88aa199366305f0721 (patch)
tree23451d313c8e83f74fb2be6d99656cbf98cb21d9 /src/lib/ffmpeg.h
parentdf811a0dd2772417496991b72fde0ef3304241d9 (diff)
Fix missing subtitles embedded in files decoded by FFmpeg (#2060).
Since the FFmpeg 4.4 update it seems that AVSubtitle::pts is no longer set (it's AV_NOPTS_VALUE, i think). Instead we apparently need to get the PTS from the packet, which in turn requires the stream's timebase.
Diffstat (limited to 'src/lib/ffmpeg.h')
-rw-r--r--src/lib/ffmpeg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ffmpeg.h b/src/lib/ffmpeg.h
index 58223fa97..b0769971e 100644
--- a/src/lib/ffmpeg.h
+++ b/src/lib/ffmpeg.h
@@ -36,6 +36,7 @@ DCPOMATIC_ENABLE_WARNINGS
struct AVFormatContext;
struct AVFrame;
+struct AVStream;
struct AVIOContext;
class FFmpegContent;
@@ -63,7 +64,7 @@ protected:
std::vector<std::shared_ptr<FFmpegAudioStream>> audio_streams, boost::optional<dcpomatic::ContentTime> first_video, double video_frame_rate
) const;
- static FFmpegSubtitlePeriod subtitle_period (AVSubtitle const & sub);
+ static FFmpegSubtitlePeriod subtitle_period (AVPacket const* packet, AVStream const* stream, AVSubtitle const & sub);
std::shared_ptr<const FFmpegContent> _ffmpeg_content;