summaryrefslogtreecommitdiff
path: root/libavfilter/vf_yadif.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-05 23:55:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-06 00:31:37 +0100
commit42411a85b78c73897fedf321697fedd61f9c41a6 (patch)
treefbc3fe9b81780d27708524c09ba3f707948e4648 /libavfilter/vf_yadif.c
parentbd7801040786788433bcb80b713aeb30e0de1ce0 (diff)
avfilter/vf_yadif: detect telecine content
Fixes: yadif with interlaced_flag_switch.mpeg Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_yadif.c')
-rw-r--r--libavfilter/vf_yadif.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 8b951a4b78..ea72e62ebd 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -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);