mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/vf_idet: add counts to frame metadata
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
a71a5c911e
commit
9d51bad625
@ -154,6 +154,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
|
||||
{
|
||||
AVFilterContext *ctx = link->dst;
|
||||
IDETContext *idet = ctx->priv;
|
||||
AVDictionary **metadata = avpriv_frame_get_metadatap(picref);
|
||||
|
||||
if (idet->prev)
|
||||
av_frame_free(&idet->prev);
|
||||
@ -177,6 +178,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
|
||||
|
||||
filter(ctx);
|
||||
|
||||
av_dict_set_int(metadata, "lavfi.idet.tff", idet->prestat[TFF], 0);
|
||||
av_dict_set_int(metadata, "lavfi.idet.bff", idet->prestat[BFF], 0);
|
||||
av_dict_set_int(metadata, "lavfi.idet.progressive", idet->prestat[PROGRESSIVE], 0);
|
||||
av_dict_set_int(metadata, "lavfi.idet.undetermined", idet->prestat[UNDETERMINED], 0);
|
||||
|
||||
return ff_filter_frame(ctx->outputs[0], av_frame_clone(idet->cur));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user