From: Limin Wang <lance.lmw...@gmail.com>

This bug was introduced in commit: 339593ca90cb3e05d659ec99a1479904ec742294 and 
339593ca90cb3e05d659ec99a1479904ec742294.

Reported-by: Marton Balint <c...@passwd.hu>
Signed-off-by: Limin Wang <lance.lmw...@gmail.com>
---
 libavfilter/vf_framerate.c    | 2 +-
 libavfilter/vf_minterpolate.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c
index 8d16998..a84578a 100644
--- a/libavfilter/vf_framerate.c
+++ b/libavfilter/vf_framerate.c
@@ -80,7 +80,7 @@ static double get_scene_score(AVFilterContext *ctx, AVFrame 
*crnt, AVFrame *next
         e_mafd = av_dict_get(next->metadata, "lavfi.scd.mafd", NULL, 
AV_DICT_MATCH_CASE);
         if (e_mafd)
             mafd = strtod(e_mafd->value, &tail);
-        if (*tail || mafd == HUGE_VAL) {
+        if (!tail || *tail || mafd == HUGE_VAL) {
             s->sad(crnt->data[0], crnt->linesize[0], next->data[0], 
next->linesize[0], crnt->width, crnt->height, &sad);
             emms_c();
             mafd = (double)sad * 100.0 / (crnt->width * crnt->height) / (1 << 
s->bitdepth);
diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c
index ef47140..df27c53 100644
--- a/libavfilter/vf_minterpolate.c
+++ b/libavfilter/vf_minterpolate.c
@@ -842,7 +842,7 @@ static int detect_scene_change(MIContext *mi_ctx)
         e_mafd = av_dict_get(mi_ctx->frames[2].avf->metadata, 
"lavfi.scd.mafd", NULL, AV_DICT_MATCH_CASE);
         if (e_mafd)
             mafd = strtod(e_mafd->value, &tail);
-        if (*tail || mafd == HUGE_VAL) {
+        if (!tail || *tail || mafd == HUGE_VAL) {
             mi_ctx->sad(p1, linesize1, p2, linesize2, me_ctx->width, 
me_ctx->height, &sad);
             emms_c();
             mafd = (double) sad * 100.0 / (me_ctx->height * me_ctx->width) / 
(1 << mi_ctx->bitdepth);
-- 
1.8.3.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to