Commit 5f2b360f authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/avfiltergraph: Add assert to write down in machine readable form what...

avfilter/avfiltergraph: Add assert to write down in machine readable form what is assumed about sample rates in swap_samplerates_on_filter()

Fixes CID1397292
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent cf3affab
......@@ -876,6 +876,8 @@ static void swap_samplerates_on_filter(AVFilterContext *filter)
for (j = 0; j < outlink->in_samplerates->nb_formats; j++) {
int diff = abs(sample_rate - outlink->in_samplerates->formats[j]);
av_assert0(diff < INT_MAX); // This would lead to the use of uninitialized best_diff but is only possible with invalid sample rates
if (diff < best_diff) {
best_diff = diff;
best_idx = j;
......
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