]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/resample.c
Windows Media Audio Lossless decoder
[ffmpeg] / libavcodec / resample.c
index 04bbbf07e41905891dbfe509a2c347235eea7e96..ba8ce8910c082b3ccb7073e5bdc69f08a03735f5 100644 (file)
@@ -162,9 +162,10 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
                MAX_CHANNELS);
         return NULL;
     }
-    if (output_channels > 2 &&
-        !(output_channels == 6 && input_channels == 2) &&
-        output_channels != input_channels) {
+    if (output_channels != input_channels &&
+        (input_channels  > 2 ||
+         output_channels > 2 &&
+         !(output_channels == 6 && input_channels == 2))) {
         av_log(NULL, AV_LOG_ERROR,
                "Resampling output channel count must be 1 or 2 for mono input; 1, 2 or 6 for stereo input; or N for N channel input.\n");
         return NULL;
@@ -213,7 +214,6 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
         }
     }
 
-#define TAPS 16
     s->resample_context = av_resample_init(output_rate, input_rate,
                                            filter_length, log2_phase_count,
                                            linear, cutoff);