diff options
author | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2020-04-05 01:00:44 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2020-04-11 13:48:52 +0200 |
commit | dbc5c0c1c8b205b7f2af6c00177d99d5f44e9207 (patch) | |
tree | 6068210ae2d11321249c91a884e7d26a42d95cb8 | |
parent | 9d21d18ec3ca2721e989fd4522d19bd90d6ac2db (diff) | |
download | ffmpeg-dbc5c0c1c8b205b7f2af6c00177d99d5f44e9207.tar.gz |
lavfi/telecine: Mark telecined frames as interlaced.
-rw-r--r-- | libavfilter/vf_telecine.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c index 62599a7a3a..ff8151dfc9 100644 --- a/libavfilter/vf_telecine.c +++ b/libavfilter/vf_telecine.c @@ -207,6 +207,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) s->stride[i], (s->planeheight[i] - !s->first_field + 1) / 2); } + s->frame[nout]->interlaced_frame = 1; + s->frame[nout]->top_field_first = !s->first_field; nout++; len--; s->occupied = 0; @@ -220,6 +222,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) inpicref->data[i], inpicref->linesize[i], s->stride[i], s->planeheight[i]); + s->frame[nout]->interlaced_frame = inpicref->interlaced_frame; + s->frame[nout]->top_field_first = inpicref->top_field_first; nout++; len -= 2; } @@ -236,6 +240,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) for (i = 0; i < nout; i++) { AVFrame *frame = av_frame_clone(s->frame[i]); + int interlaced = frame->interlaced_frame; + int tff = frame->top_field_first; if (!frame) { av_frame_free(&inpicref); @@ -243,6 +249,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) } av_frame_copy_props(frame, inpicref); + frame->interlaced_frame = interlaced; + frame->top_field_first = tff; frame->pts = ((s->start_time == AV_NOPTS_VALUE) ? 0 : s->start_time) + av_rescale(outlink->frame_count_in, s->ts_unit.num, s->ts_unit.den); |