diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2013-10-01 19:08:03 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-10-02 16:40:49 +0200 |
commit | 06e7301a2efa8dededecbe6836ee5b59bf7e5e76 (patch) | |
tree | 9492c171bff7f1674a8de49f28f1d9e62f134041 | |
parent | 628a17d78ac1d95d83482b0c333c03bdb1fffbe9 (diff) | |
download | ffmpeg-06e7301a2efa8dededecbe6836ee5b59bf7e5e76.tar.gz |
vf_interlace: do not process an already interlaced frame
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavfilter/vf_interlace.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c index d65473967f..139d5b0247 100644 --- a/libavfilter/vf_interlace.c +++ b/libavfilter/vf_interlace.c @@ -181,6 +181,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) if (!s->cur || !s->next) return 0; + if (s->cur->interlaced_frame) { + av_log(ctx, AV_LOG_WARNING, + "video is already interlaced, adjusting framerate only\n"); + out = av_frame_clone(s->cur); + out->pts /= 2; // adjust pts to new framerate + ret = ff_filter_frame(outlink, out); + s->got_output = 1; + return ret; + } + tff = (s->scan == MODE_TFF); out = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!out) |