Commit 4372ce8a authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Check validity of sample rate before setting it in QSA filters.

parent c4fd2eea
......@@ -272,8 +272,7 @@ static int ms_qsa_read_set_sample_rate(MSFilter *f, void *arg) {
if (rm->hz == rate) break;
rm++;
}
if (rm->hz != 0) {
ms_error("\trate = %d", rate);
if ((rm->hz != 0) && (d->info.rates & rm->pcm_rate)) {
d->rate = rate;
return 0;
}
......@@ -548,8 +547,7 @@ static int ms_qsa_write_set_sample_rate(MSFilter *f, void *arg) {
if (rm->hz == rate) break;
rm++;
}
if (rm->hz != 0) {
ms_error("\trate = %d", rate);
if ((rm->hz != 0) && (d->info.rates & rm->pcm_rate)) {
d->rate = rate;
return 0;
}
......
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