Avoid decoding other packets when looking for subs.
authorCarl Hetherington <cth@carlh.net>
Fri, 16 Oct 2015 13:38:44 +0000 (14:38 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 16 Oct 2015 13:38:44 +0000 (14:38 +0100)
commit9e025d3f85f9d6d855b3d5e6c90bca0eac3a3d49
treeafc3e4a093a357bc7144a554c139e71b05fca9c5
parente7811b466eff496db7f63842df2fa4a4410afe14
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.
17 files changed:
src/lib/audio_decoder_stream.cc
src/lib/dcp_decoder.cc
src/lib/dcp_decoder.h
src/lib/dcp_subtitle_decoder.cc
src/lib/dcp_subtitle_decoder.h
src/lib/decoder.h
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_decoder.h
src/lib/image_decoder.cc
src/lib/image_decoder.h
src/lib/sndfile_decoder.cc
src/lib/sndfile_decoder.h
src/lib/subrip_decoder.cc
src/lib/subrip_decoder.h
src/lib/subtitle_decoder.cc
src/lib/video_decoder.cc
test/audio_decoder_test.cc