diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2011-01-15 03:32:36 +0300 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2011-01-15 03:32:36 +0300 |
commit | a51c71bb54c53ccb22e7972f8f60819f7f4f2c9f (patch) | |
tree | b9d5066ee90fac72e37adc35f48b96b1bf2874b4 /libavfilter/vf_yadif.c | |
parent | 3cdf69eefa055ec6a08972e9e69f7e90854e42f9 (diff) |
In yadif filter, default to top field first if interlacing is unknown
Originally committed as revision 26347 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/vf_yadif.c')
-rw-r--r-- | libavfilter/vf_yadif.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index d96e5877e9..bd0a9de877 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -167,7 +167,14 @@ static void return_frame(AVFilterContext *ctx, int is_second) { YADIFContext *yadif = ctx->priv; AVFilterLink *link= ctx->outputs[0]; - int tff = yadif->parity == -1 ? yadif->cur->video->top_field_first : (yadif->parity^1); + int tff; + + if (yadif->parity == -1) { + tff = yadif->cur->video->interlaced ? + yadif->cur->video->top_field_first : 1; + } else { + tff = yadif->parity^1; + } if (is_second) yadif->out = avfilter_get_video_buffer(link, AV_PERM_WRITE | AV_PERM_PRESERVE | |