Commit 1d3752f6 authored by Stefan Westerfeld's avatar Stefan Westerfeld

Add sample rate check to ensure input_rate == output_rate.

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent f26a90cf
......@@ -647,6 +647,12 @@ add_watermark (const string& infile, const string& outfile, const string& bits)
return 1;
}
}
if (out_stream->sample_rate() != in_stream->sample_rate())
{
error ("audiowmark: input sample rate (%d) and output sample rate (%d) don't match\n", in_stream->sample_rate(), out_stream->sample_rate());
return 1;
}
vector<float> samples;
const int n_channels = in_stream->n_channels();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment