[FFmpeg-devel] [PATCH] hlsenc: added floating point time support.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Apr 3 08:20:56 CEST 2014

On 03.04.2014, at 00:39, Michael Niedermayer <michaelni at gmx.at> wrote:

> On Thu, Apr 03, 2014 at 12:57:44AM +0530, Senthil wrote:
>> On Wed, Apr 2, 2014 at 10:56 AM, Reimar Döffinger
>> <Reimar.Doeffinger at gmx.de>wrote:
>>> On 02.04.2014, at 05:29, Senthil <senthil.codr at gmail.com> wrote:
>>>> Necessary for HLS version 3 and above.  Fixes ticket #3505.
>> Either way, both float itself and %f have very limited precision.
>>> I'd suggest going with double and explicitly specifying a higher precision
>>> in the format string.
>>> Possibly even going with %e if the spec allows for it and there are no
>>> compatibility issues.
>> Here is the relevant portion in the spec:
>> http://tools.ietf.org/html/draft-pantos-http-live-streaming-12#section-3.3.2
>> Though it does not mention about double precision, I have produced a double
>> version of the patch below.
>> Necessary for HLS version 3 and above.  Fixes ticket #3505.
>> Signed-off-by: Senthilnathan M <senthil.codr at gmail.com>
> applied

Sorry, but I disagree.
The specification says _should_ use float, so it is absolutely _not_ in any way necessary for HLS3.
At the same time it is _not_ allowed for HLS2, so unless I missed a check this breaks anything that only supports HLS2.
Lastly, the latest change did nothing to address the very limited precision of the %f format specifier (even though it might not be that relevant).
Lastly, the ticket does not even mention what the point/advantage of sub-second precision would be.
In summary: It looks to me like the patch break things without actually fixing anything at all.

More information about the ffmpeg-devel mailing list