Tidy up test for whether or not to resample.
authorCarl Hetherington <cth@carlh.net>
Tue, 2 Oct 2012 15:27:51 +0000 (16:27 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 2 Oct 2012 15:27:51 +0000 (16:27 +0100)
src/lib/j2k_wav_encoder.cc

index 87514bf14eff5999a9dc78e8eb995f6ed039c849..c37efb47266a8be58c5062000a64c6c9f22ba224 100644 (file)
@@ -221,7 +221,7 @@ J2KWAVEncoder::encoder_thread (ServerDescription* server)
 void
 J2KWAVEncoder::process_begin (int64_t audio_channel_layout, AVSampleFormat audio_sample_format)
 {
-       if ((_fs->audio_sample_rate != dcp_audio_sample_rate (_fs->audio_sample_rate)) || (rint (_fs->frames_per_second) != _fs->frames_per_second)) {
+       if (_fs->audio_sample_rate != _fs->target_sample_rate ()) {
 #ifdef HAVE_SWRESAMPLE
 
                stringstream s;