Commit 42411a85 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_yadif: detect telecine content

Fixes: yadif with interlaced_flag_switch.mpeg
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent bd780104
......@@ -345,7 +345,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
if (!yadif->prev)
return 0;
if ((yadif->deint && !yadif->cur->interlaced_frame) || ctx->is_disabled) {
if ((yadif->deint && !yadif->cur->interlaced_frame) ||
ctx->is_disabled ||
(yadif->deint && !yadif->prev->interlaced_frame && yadif->prev->repeat_pict) ||
(yadif->deint && !yadif->next->interlaced_frame && yadif->next->repeat_pict)
) {
yadif->out = av_frame_clone(yadif->cur);
if (!yadif->out)
return AVERROR(ENOMEM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment