#11188: ffmpeg_opt.c correct_input_start_times(void) calculates wrong ts_offset
-------------------------------------+----------------------------------
Reporter: Jens Viebig | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: tools
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+----------------------------------
Comment (by Jens Viebig):
This is much more clear to read:
abs_start_seek = is->start_time + ((ifile->start_time != AV_NOPTS_VALUE) ?
ifile->start_time : 0);
if we remove the parenthesis like this:
abs_start_seek = is->start_time + (ifile->start_time != AV_NOPTS_VALUE ?
ifile->start_time : 0);
is it guaranteed to evaluate "ifile->start_time != AV_NOPTS_VALUE" before
the shorthand if ?
Or is there a risk that it will be evaluated as "AV_NOPTS_VALUE ?
ifile->start_time : 0" ?
We think with both parenthesis in place is the most safe and readable
option
--
Ticket URL: <https://trac.ffmpeg.org/ticket/11188#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".