diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-04-09 11:34:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-04-09 11:34:41 +0100 |
| commit | 16b279646ca4e921aa6ea06c59256e3bca7e5a61 (patch) | |
| tree | 3699886ed654b2140124080de77b792cd15b13b7 /src | |
| parent | 8c11b87490f0e0e75487c856b4f8584472376d26 (diff) | |
Fix problems with FFmpegContent with no audio streams.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/player.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 368d4c2ff..2450ace2e 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -410,6 +410,13 @@ Player::get_audio (DCPTime time, DCPTime length, bool accurate) shared_ptr<AudioDecoder> decoder = dynamic_pointer_cast<AudioDecoder> ((*i)->decoder); assert (decoder); + if (content->content_audio_frame_rate() == 0) { + /* This AudioContent has no audio (e.g. if it is an FFmpegContent with no + * audio stream). + */ + continue; + } + AudioFrame const content_time = dcp_to_content_audio (*i, time); /* Audio from this piece's decoder (which might be more than what we asked for) */ |
