fftools/ffmpeg: drop always-true conditions

in_picture->pts cannot be AV_NOPTS_VALUE, as it is set to ost->sync_opts
a few lines above. ost->sync_opts is never AV_NOPTS_VALUE.
This commit is contained in:
Anton Khirnov 2022-09-04 12:12:09 +02:00
parent 3d86a13b47
commit 7a994c8701
1 changed files with 2 additions and 4 deletions

View File

@ -1291,12 +1291,10 @@ static void do_video_out(OutputFile *of,
in_picture->quality = enc->global_quality;
in_picture->pict_type = 0;
if (ost->forced_kf_ref_pts == AV_NOPTS_VALUE &&
in_picture->pts != AV_NOPTS_VALUE)
if (ost->forced_kf_ref_pts == AV_NOPTS_VALUE)
ost->forced_kf_ref_pts = in_picture->pts;
pts_time = in_picture->pts != AV_NOPTS_VALUE ?
(in_picture->pts - ost->forced_kf_ref_pts) * av_q2d(enc->time_base) : NAN;
pts_time = (in_picture->pts - ost->forced_kf_ref_pts) * av_q2d(enc->time_base);
if (ost->forced_kf_index < ost->forced_kf_count &&
in_picture->pts >= ost->forced_kf_pts[ost->forced_kf_index]) {
ost->forced_kf_index++;