Browse Source

vf_interlace: do not process an already interlaced frame

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n2.1
Vittorio Giovara Anton Khirnov 12 years ago
parent
commit
06e7301a2e
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      libavfilter/vf_interlace.c

+ 10
- 0
libavfilter/vf_interlace.c View File

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


Loading…
Cancel
Save