diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-26 09:37:29 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-26 09:37:29 +0000 |
| commit | 2e62b2c0de47fc8e5bcb5466b2876f9b23d2ae84 (patch) | |
| tree | dd6ec559cfb77bc16a510aebbe1021b114a53748 /src/lib/ffmpeg_decoder.cc | |
| parent | 526fd6de4c80a7ac9614a1cb0209efff7b171cd5 (diff) | |
Reinstate subtitle speed-up patch 526fd6de4c80a7ac9614a1cb0209efff7b171cd5 but only for preview.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 72a3d02b4..cc4bd34d4 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -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 (reason != PASS_REASON_SUBTITLE) { decode_audio_packet (); } |
