diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-05-11 01:05:29 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | 49a1e2a600bd7b9d2d4a926256378e6134704a1a (patch) | |
| tree | 4251de8d16e5b994569a1367e1b56f7e95719c27 /src/lib/ffmpeg_decoder.cc | |
| parent | 5487e9d12cd84f1dbe976ec022a4ddd4c3f52cd2 (diff) | |
Fix seek, for video at least.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 195167d4b..e3a425375 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -302,9 +302,17 @@ FFmpegDecoder::bytes_per_audio_sample (shared_ptr<FFmpegAudioStream> stream) con void FFmpegDecoder::seek (ContentTime time, bool accurate) { - video->seek (time, accurate); - audio->seek (time, accurate); - subtitle->seek (time, accurate); + if (video) { + video->seek (time, accurate); + } + + if (audio) { + audio->seek (time, accurate); + } + + if (subtitle) { + subtitle->seek (time, accurate); + } /* If we are doing an `accurate' seek, we need to use pre-roll, as we don't really know what the seek will give us. |
