fftools/ffmpeg_opt: Fix precedence issue in abs_start_seek calculation

This patch corrects a C operator precedence issue in fftools/ffmpeg_opt.c
where the abs_start_seek calculation did not yield the expected result
due to incorrect placement of parentheses.
This commit is contained in:
Pradeep Kumar Goudagunta 2024-12-25 17:39:27 -06:00 committed by Gyan Doshi
parent 3778b1f6f1
commit aa20294b31

View file

@ -354,7 +354,7 @@ static void correct_input_start_times(void)
if (copy_ts && start_at_zero)
ifile->ts_offset = -new_start_time;
else if (!copy_ts) {
abs_start_seek = is->start_time + (ifile->start_time != AV_NOPTS_VALUE) ? ifile->start_time : 0;
abs_start_seek = is->start_time + ((ifile->start_time != AV_NOPTS_VALUE) ? ifile->start_time : 0);
ifile->ts_offset = abs_start_seek > new_start_time ? -abs_start_seek : -new_start_time;
} else if (copy_ts)
ifile->ts_offset = 0;