diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-16 14:38:44 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-16 14:38:44 +0100 |
| commit | 9e025d3f85f9d6d855b3d5e6c90bca0eac3a3d49 (patch) | |
| tree | afc3e4a093a357bc7144a554c139e71b05fca9c5 /src/lib/audio_decoder_stream.cc | |
| parent | e7811b466eff496db7f63842df2fa4a4410afe14 (diff) | |
Avoid decoding other packets when looking for subs.
The "accumulation" of, for example, video data when we are looking
for audio data is an *optimisation* to reduce the number of seeks.
It should not be necessary for correctness (the output should be right
even if we never kept anything except what we were looking for).
Doing this accumulation is not always an optimisation; sometimes not
doing it is better. Avoiding it when going back for subtitles is one
of these cases.
Diffstat (limited to 'src/lib/audio_decoder_stream.cc')
| -rw-r--r-- | src/lib/audio_decoder_stream.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/audio_decoder_stream.cc b/src/lib/audio_decoder_stream.cc index 274bf2d54..4d1a5e4c5 100644 --- a/src/lib/audio_decoder_stream.cc +++ b/src/lib/audio_decoder_stream.cc @@ -87,7 +87,7 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate) /* Keep stuffing data into _decoded until we have enough data, or the subclass does not want to give us any more */ while ( (_decoded.frame > frame || (_decoded.frame + _decoded.audio->frames()) < end) && - !_decoder->pass () + !_decoder->pass (Decoder::PASS_REASON_AUDIO) ) {} @@ -95,7 +95,7 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate) } else { while ( _decoded.audio->frames() < length && - !_decoder->pass () + !_decoder->pass (Decoder::PASS_REASON_AUDIO) ) {} |
