Fix another crash on stills with no audio.
authorCarl Hetherington <cth@carlh.net>
Mon, 20 May 2013 11:33:37 +0000 (12:33 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 20 May 2013 11:33:37 +0000 (12:33 +0100)
src/lib/sndfile_decoder.cc

index fdaf2eeaaf4397ad5d1cb1430ebc6d006607a5b7..7e9e67d0fa2e24fd0ede23561ac47bbe682187e8 100644 (file)
@@ -96,6 +96,10 @@ SndfileDecoder::SndfileDecoder (shared_ptr<Film> f, DecodeOptions o)
 bool
 SndfileDecoder::pass ()
 {
+       if (_audio_streams.empty ()) {
+               return true;
+       }
+       
        /* Do things in half second blocks as I think there may be limits
           to what FFmpeg (and in particular the resampler) can cope with.
        */