mirror of https://git.ffmpeg.org/ffmpeg.git
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
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4f49fa6abe
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
853147f753
commit
3d3a60533b
|
@ -167,6 +167,11 @@ static void print_stats(AVFilterContext *ctx)
|
|||
float chdr, secondpeak, rmssum = 0;
|
||||
int i, j, first = 0;
|
||||
|
||||
if (!p->nb_samples) {
|
||||
av_log(ctx, AV_LOG_INFO, "No data, dynamic range not meassurable\n");
|
||||
return;
|
||||
}
|
||||
|
||||
finish_block(p);
|
||||
|
||||
for (i = 0; i <= 10000; i++) {
|
||||
|
|
Loading…
Reference in New Issue