Basic support for trusted device lists in KDMs (#750).
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index 72a3d02b49f6f732827a649ab24d4e4815ce64bf..c3a42545a6ed695a97a06257971e9bd71fae6059 100644 (file)
@@ -89,7 +89,7 @@ FFmpegDecoder::flush ()
 }
 
 bool
-FFmpegDecoder::pass ()
+FFmpegDecoder::pass (PassReason reason, bool accurate)
 {
        int r = av_read_frame (_format_context, &_packet);
 
@@ -112,11 +112,11 @@ FFmpegDecoder::pass ()
        int const si = _packet.stream_index;
        shared_ptr<const FFmpegContent> fc = _ffmpeg_content;
 
-       if (si == _video_stream && !_ignore_video) {
+       if (si == _video_stream && !_ignore_video && (accurate || reason != PASS_REASON_SUBTITLE)) {
                decode_video_packet ();
        } else if (fc->subtitle_stream() && fc->subtitle_stream()->uses_index (_format_context, si)) {
                decode_subtitle_packet ();
-       } else {
+       } else if (accurate || reason != PASS_REASON_SUBTITLE) {
                decode_audio_packet ();
        }