Fix hang on attempt to emit zero frames of silence.
authorCarl Hetherington <cth@carlh.net>
Fri, 23 Aug 2013 09:38:59 +0000 (10:38 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 23 Aug 2013 09:38:59 +0000 (10:38 +0100)
src/lib/player.cc

index ebc8102143c167934a38e929cb586ca6caf4668c..bae00d348684bfb7d92012e0d0d726f266f212d2 100644 (file)
@@ -564,6 +564,10 @@ Player::emit_black ()
 void
 Player::emit_silence (OutputAudioFrame most)
 {
+       if (most == 0) {
+               return;
+       }
+       
        OutputAudioFrame N = min (most, _film->audio_frame_rate() / 2);
        shared_ptr<AudioBuffers> silence (new AudioBuffers (_film->audio_channels(), N));
        silence->make_silent ();