mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
resample: reject unhandled conversions
audio_resample can not reduce the number of channels
This commit is contained in:
parent
ec1ce86e7f
commit
b2e56e08c9
@ -162,9 +162,10 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
|
|||||||
MAX_CHANNELS);
|
MAX_CHANNELS);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (output_channels > 2 &&
|
if (output_channels != input_channels &&
|
||||||
!(output_channels == 6 && input_channels == 2) &&
|
(input_channels > 2 ||
|
||||||
output_channels != input_channels) {
|
output_channels > 2 &&
|
||||||
|
!(output_channels == 6 && input_channels == 2))) {
|
||||||
av_log(NULL, AV_LOG_ERROR,
|
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");
|
"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;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user