summaryrefslogtreecommitdiff
path: root/libavfilter/vf_blackdetect.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/vf_blackdetect.c')
-rw-r--r--libavfilter/vf_blackdetect.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c
index 9c9e6b4993..ddbf082a2d 100644
--- a/libavfilter/vf_blackdetect.c
+++ b/libavfilter/vf_blackdetect.c
@@ -43,7 +43,6 @@ typedef struct {
double pixel_black_th;
unsigned int pixel_black_th_i;
- unsigned int frame_count; ///< frame number
unsigned int nb_black_pixels; ///< number of black pixels counted so far
} BlackDetectContext;
@@ -149,8 +148,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
picture_black_ratio = (double)blackdetect->nb_black_pixels / (inlink->w * inlink->h);
av_log(ctx, AV_LOG_DEBUG,
- "frame:%u picture_black_ratio:%f pts:%s t:%s type:%c\n",
- blackdetect->frame_count, picture_black_ratio,
+ "frame:%"PRId64" picture_black_ratio:%f pts:%s t:%s type:%c\n",
+ inlink->frame_count, picture_black_ratio,
av_ts2str(picref->pts), av_ts2timestr(picref->pts, &inlink->time_base),
av_get_picture_type_char(picref->pict_type));
@@ -168,7 +167,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
}
blackdetect->last_picref_pts = picref->pts;
- blackdetect->frame_count++;
blackdetect->nb_black_pixels = 0;
return ff_filter_frame(inlink->dst->outputs[0], picref);
}