avfilter/vf_freezedetect: fix missing freeze_start when the freeze length is around...
authorMarton Balint <cus@passwd.hu>
Wed, 1 May 2019 17:11:52 +0000 (19:11 +0200)
committerMarton Balint <cus@passwd.hu>
Sun, 5 May 2019 18:07:35 +0000 (20:07 +0200)
Fixes ticket #7875.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavfilter/vf_freezedetect.c

index 299a5df..cc086af 100644 (file)
@@ -177,10 +177,9 @@ static int activate(AVFilterContext *ctx)
 
             frozen = is_frozen(s, s->reference_frame, frame);
             if (duration >= s->duration) {
-                if (frozen) {
-                    if (!s->frozen)
-                        set_meta(s, frame, "lavfi.freezedetect.freeze_start", av_ts2timestr(s->reference_frame->pts, &inlink->time_base));
-                } else {
+                if (!s->frozen)
+                    set_meta(s, frame, "lavfi.freezedetect.freeze_start", av_ts2timestr(s->reference_frame->pts, &inlink->time_base));
+                if (!frozen) {
                     set_meta(s, frame, "lavfi.freezedetect.freeze_duration", av_ts2timestr(duration, &AV_TIME_BASE_Q));
                     set_meta(s, frame, "lavfi.freezedetect.freeze_end", av_ts2timestr(frame->pts, &inlink->time_base));
                 }