[FFmpeg-devel] [PATCH] dashenc: more accurate time values in playlist.mpd

Alfred E. Heggestad alfred.heggestad at gmail.com
Thu Mar 5 17:32:40 EET 2020



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.heggestad at 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 ?


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


More information about the ffmpeg-devel mailing list