summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffmpeg_decoder.h')
-rw-r--r--src/lib/ffmpeg_decoder.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h
index 9de44333c..1e47e2fca 100644
--- a/src/lib/ffmpeg_decoder.h
+++ b/src/lib/ffmpeg_decoder.h
@@ -58,7 +58,12 @@ public:
private:
friend struct ::ffmpeg_pts_offset_test;
- bool flush ();
+ enum class FlushResult {
+ DONE,
+ AGAIN
+ };
+
+ FlushResult flush();
AVSampleFormat audio_sample_format (std::shared_ptr<FFmpegAudioStream> stream) const;
int bytes_per_audio_sample (std::shared_ptr<FFmpegAudioStream> stream) const;
@@ -77,6 +82,9 @@ private:
void maybe_add_subtitle ();
+ FlushResult flush_codecs();
+ FlushResult flush_fill();
+
VideoFilterGraphSet _filter_graphs;
dcpomatic::ContentTime _pts_offset;
@@ -87,4 +95,12 @@ private:
std::shared_ptr<Image> _black_image;
std::map<std::shared_ptr<FFmpegAudioStream>, boost::optional<dcpomatic::ContentTime>> _next_time;
+
+ enum class FlushState {
+ CODECS,
+ AUDIO_DECODER,
+ FILL,
+ };
+
+ FlushState _flush_state = FlushState::CODECS;
};