summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_opt.c
diff options
context:
space:
mode:
authorVishwanath Dixit <vdixit@akamai.com>2018-05-06 22:38:59 +0530
committerMichael Niedermayer <michael@niedermayer.cc>2018-06-04 22:26:55 +0200
commit146cdf7e4bb029c9e457742d82d00d3b396b9ff4 (patch)
treef5712781b0ddfe22e8c1d39c252166416d110fbe /fftools/ffmpeg_opt.c
parentf56a0b02cdbf8d5820de400e584a72b002cd461a (diff)
fftools/ffmpeg: fix for all forced key frames when 'copyts' is enabled
Forced key frames generation functionality was assuming the first PTS value as zero, but, when 'copyts' is enabled, the first PTS can be any big number. This was eventually forcing all the frames as key frames. To resolve this issue, update has been made to use first input pts as reference pts. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'fftools/ffmpeg_opt.c')
-rw-r--r--fftools/ffmpeg_opt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 8ae68aec0e..36bce4465a 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1324,6 +1324,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
ost->file_index = nb_output_files - 1;
ost->index = idx;
ost->st = st;
+ ost->forced_kf_ref_pts = AV_NOPTS_VALUE;
st->codecpar->codec_type = type;
ret = choose_encoder(o, oc, ost);