History

avfilter/af_drmeter: Check that there is data

Fixes: floating point division by 0 Fixes: -nan is outside the range of representable values of type 'int' Fixes: Ticket8307

Michael Niedermayer committed 5 years ago

Commit 4f49fa61 parent 1f213491 file · +5 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_drmeter.c+5−0
@@ -167,6 +167,11 @@ static void print_stats(AVFilterContext *ctx) · 166 unmodified lines
167 float chdr, secondpeak, rmssum = 0;167 float chdr, secondpeak, rmssum = 0;
168 int i, j, first = 0;168 int i, j, first = 0;
169 169
170 if (!p->nb_samples) {
171 av_log(ctx, AV_LOG_INFO, "No data, dynamic range not meassurable\n");
172 return;
173 }
174
170 finish_block(p);175 finish_block(p);
171 176
172 for (i = 0; i <= 10000; i++) {177 for (i = 0; i <= 10000; i++) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t