Try to throw an exception rather than asserting on an unknown sound format.
authorCarl Hetherington <cth@carlh.net>
Tue, 18 Dec 2012 19:05:55 +0000 (19:05 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Dec 2012 19:05:55 +0000 (19:05 +0000)
src/lib/ffmpeg_decoder.cc

index 74eb8934ca5e87ffbde809bf3e9fb70b2360014d..911714d7b3c31c19876d2aaef8eefbbfcbbb1c93 100644 (file)
@@ -450,7 +450,7 @@ FFmpegDecoder::deinterleave_audio (uint8_t* data, int size)
        break;
 
        default:
-               assert (false);
+               throw DecodeError (String::compose ("Unrecognised audio sample format (%1)", static_cast<int> (audio_sample_format())));
        }
 
        return audio;