Skip to content

Commit

Permalink
avfilter/vf_freezedetect: fix missing freeze_start when the freeze le…
Browse files Browse the repository at this point in the history
…ngth is around the detection duration

Fixes ticket #7875.

Signed-off-by: Marton Balint <[email protected]>
  • Loading branch information
cus committed May 5, 2019
1 parent 15b8f36 commit 328a968
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions libavfilter/vf_freezedetect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 328a968

Please sign in to comment.