}
- if (!_video && _playlist->audio_from() == Playlist::AUDIO_FFMPEG && _sequential_audio_decoder < _audio_decoders.size ()) {
+ if (!_video && _audio && _playlist->audio_from() == Playlist::AUDIO_FFMPEG && _sequential_audio_decoder < _audio_decoders.size ()) {
/* We're not producing video, so we may need to run FFmpeg content to get the audio */
}
- if (_playlist->audio_from() == Playlist::AUDIO_SNDFILE) {
+ if (_audio && _playlist->audio_from() == Playlist::AUDIO_SNDFILE) {
/* We're getting audio from SndfileContent */
}
void
-Player::process_video (shared_ptr<Image> i, bool same, shared_ptr<Subtitle> s, double t)
+Player::process_video (shared_ptr<const Image> i, bool same, shared_ptr<Subtitle> s, double t)
{
Video (i, same, s, _video_start[_video_decoder] + t);
}
void
-Player::process_audio (weak_ptr<const AudioContent> c, shared_ptr<AudioBuffers> b, double t)
+Player::process_audio (weak_ptr<const AudioContent> c, shared_ptr<const AudioBuffers> b, double t)
{
AudioMapping mapping = _film->audio_mapping ();
if (!_audio_buffers) {
_have_valid_decoders = true;
}
+ if (_video_decoders.empty ()) {
+ return true;
+ }
+
/* Find the decoder that contains this position */
_video_decoder = 0;
while (1) {