Commit 328a9683 authored by Marton Balint's avatar Marton Balint

avfilter/vf_freezedetect: fix missing freeze_start when the freeze length is...

avfilter/vf_freezedetect: fix missing freeze_start when the freeze length is around the detection duration

Fixes ticket #7875.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 15b8f36b
......@@ -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));
}
......
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