On 3/5/20 9:02 PM, Alfred E. Heggestad wrote: > > > On 05/03/2020 15:37, Carl Eugen Hoyos wrote: >> Am Do., 5. März 2020 um 11:08 Uhr schrieb Alfred E. Heggestad >> <alfred.hegges...@gmail.com>: >> >>> - int64_t update_period = c->last_duration / AV_TIME_BASE; >>> + double update_period = (double)c->last_duration / AV_TIME_BASE; >> >> Can't you instead do int64 update_period = last_duration * 1000 / >> AV_TIME_BASE >> to avoid using doubles that will potentially break automatic testing? >> > > in this case the update_period will be in [milliseconds] units. > how should I print that ? I guess in any case a . will be present that can break any automatic testing. I would suggest having this feature of printing double(.3f) under an option with default as false. In that way there anyone relying on the current behavior is not affected. > > > or we can use write_time() to print it, in AV_TIME_BASE units: > > > int64_t update_period = c->last_duration; > > avio_printf(out, "\tminimumUpdatePeriod=\""); > write_time(out, update_period); > avio_printf(out, "\"\n"); > > > > > > /alfred > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".