aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-02 18:48:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-02 18:48:03 +0100
commit46b64e30989519b0a04cba3c32c34fa187687440 (patch)
tree04e614d37b28f286291b8ef4ac2e9d5a989b9db8
parent59f1f764d6cd07ff7d1bb113d423b3e62b3510c1 (diff)
downloadffmpeg-46b64e30989519b0a04cba3c32c34fa187687440.tar.gz
Revert "avfilter/vf_interlace: more accurate pts calculation"
This reverts commit df8248f66e362c3015d95ac86d1917dde8dc0a0c. the revert produces a timebase and timestamps that are more close to what users expect Hoped-by: koda
-rw-r--r--libavfilter/vf_interlace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c
index a63f9152cc..2828e36680 100644
--- a/libavfilter/vf_interlace.c
+++ b/libavfilter/vf_interlace.c
@@ -109,6 +109,7 @@ static int config_out_props(AVFilterLink *outlink)
outlink->time_base = inlink->time_base;
outlink->frame_rate = inlink->frame_rate;
// half framerate
+ outlink->time_base.num *= 2;
outlink->frame_rate.den *= 2;
outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP;
@@ -204,6 +205,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
av_frame_copy_props(out, s->cur);
out->interlaced_frame = 1;
out->top_field_first = tff;
+ out->pts /= 2; // adjust pts to new framerate
/* copy upper/lower field from cur */
copy_picture_field(s, s->cur, out, inlink, tff ? FIELD_UPPER : FIELD_LOWER, s->lowpass);