Fix crash in tests.
authorCarl Hetherington <cth@carlh.net>
Thu, 25 Jul 2013 12:49:55 +0000 (13:49 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 25 Jul 2013 12:49:55 +0000 (13:49 +0100)
src/lib/audio_decoder.cc

index e827a77b9198f44addfabd827e030fc260121bf5..cf9e3ac51a7e12a516c9946e4551a6546d45db52 100644 (file)
@@ -36,7 +36,7 @@ AudioDecoder::AudioDecoder (shared_ptr<const Film> film, shared_ptr<const AudioC
        : Decoder (film)
        , _audio_position (0)
 {
-       if (content->content_audio_frame_rate() != content->output_audio_frame_rate()) {
+       if (content->content_audio_frame_rate() != content->output_audio_frame_rate() && content->audio_channels ()) {
                _resampler.reset (
                        new Resampler (
                                content->content_audio_frame_rate(),