diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-11-28 08:41:07 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-08 07:37:18 +0100 |
commit | 7e350379f87e7f74420b4813170fe808e2313911 (patch) | |
tree | 031201839361d40af8b4c829f9c9f179e7d9f58d /libavfilter/vf_blackframe.c | |
parent | 77b2cd7b41d7ec8008b6fac753c04f77824c514c (diff) | |
download | ffmpeg-7e350379f87e7f74420b4813170fe808e2313911.tar.gz |
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
Diffstat (limited to 'libavfilter/vf_blackframe.c')
-rw-r--r-- | libavfilter/vf_blackframe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c index 275ebb2070..5181392b1b 100644 --- a/libavfilter/vf_blackframe.c +++ b/libavfilter/vf_blackframe.c @@ -78,7 +78,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) return 0; } -static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) +static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext *ctx = inlink->dst; BlackFrameContext *blackframe = ctx->priv; @@ -86,7 +86,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) int pblack = 0; uint8_t *p = frame->data[0]; - for (i = 0; i < frame->video->h; i++) { + for (i = 0; i < frame->height; i++) { for (x = 0; x < inlink->w; x++) blackframe->nblack += p[x] < blackframe->bthresh; p += frame->linesize[0]; @@ -94,8 +94,8 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame) pblack = blackframe->nblack * 100 / (inlink->w * inlink->h); if (pblack >= blackframe->bamount) - av_log(ctx, AV_LOG_INFO, "frame:%u pblack:%u pos:%"PRId64" pts:%"PRId64" t:%f\n", - blackframe->frame, pblack, frame->pos, frame->pts, + av_log(ctx, AV_LOG_INFO, "frame:%u pblack:%u pts:%"PRId64" t:%f\n", + blackframe->frame, pblack, frame->pts, frame->pts == AV_NOPTS_VALUE ? -1 : frame->pts * av_q2d(inlink->time_base)); blackframe->frame++; |