avfilter/vf_yadif: detect telecine content

Fixes: yadif with interlaced_flag_switch.mpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-01-05 23:55:59 +01:00
parent bd78010407
commit 42411a85b7

View File

@ -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);