avfilter/vf_freezedetect: fix missing freeze_start when the freeze length is around the detection duration
Fixes ticket #7875. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
15b8f36be1
commit
328a96839d
@ -177,10 +177,9 @@ static int activate(AVFilterContext *ctx)
|
|||||||
|
|
||||||
frozen = is_frozen(s, s->reference_frame, frame);
|
frozen = is_frozen(s, s->reference_frame, frame);
|
||||||
if (duration >= s->duration) {
|
if (duration >= s->duration) {
|
||||||
if (frozen) {
|
if (!s->frozen)
|
||||||
if (!s->frozen)
|
set_meta(s, frame, "lavfi.freezedetect.freeze_start", av_ts2timestr(s->reference_frame->pts, &inlink->time_base));
|
||||||
set_meta(s, frame, "lavfi.freezedetect.freeze_start", av_ts2timestr(s->reference_frame->pts, &inlink->time_base));
|
if (!frozen) {
|
||||||
} else {
|
|
||||||
set_meta(s, frame, "lavfi.freezedetect.freeze_duration", av_ts2timestr(duration, &AV_TIME_BASE_Q));
|
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));
|
set_meta(s, frame, "lavfi.freezedetect.freeze_end", av_ts2timestr(frame->pts, &inlink->time_base));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user