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

Jeyapal, Karthick kjeyapal at akamai.com
Mon Mar 9 05:36:23 EET 2020


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.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 ?
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 at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list