[FFmpeg-cvslog] avfilter/vf_freezedetect: fix missing freeze_start when the freeze length is around the detection duration

Marton Balint git at videolan.org
Sun May 5 21:20:56 EEST 2019


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Wed May  1 19:11:52 2019 +0200| [328a96839d4d953285f9875b217bebaa5fd783b0] | committer: Marton Balint

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 at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=328a96839d4d953285f9875b217bebaa5fd783b0
---

 libavfilter/vf_freezedetect.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_freezedetect.c b/libavfilter/vf_freezedetect.c
index 299a5dfbf6..cc086afee6 100644
--- a/libavfilter/vf_freezedetect.c
+++ b/libavfilter/vf_freezedetect.c
@@ -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));
                 }



More information about the ffmpeg-cvslog mailing list