]> git.sesse.net Git - ffmpeg/commit
avformat/webmdashenc: Avoid allocation for parsing a number
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 18 May 2020 00:48:49 +0000 (02:48 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 23 May 2020 04:05:16 +0000 (06:05 +0200)
commit325c901430781ad2d915828389a8ed5f1ad849bc
tree15ab5f3d4c3db70a9729ca7c6a6cd05e958af053
parent06fdc823371d295a6f29993e5c2e9ed7df3610d2
avformat/webmdashenc: Avoid allocation for parsing a number

In order to parse a number from a string, the WebM DASH manifest muxer
would duplicate (via heap-allocation) the part of the string that
contains the number, then read the number via atoi() and then free the
duplicate again. This has been replaced by simply using strtoll() (which
in contrast to atoi() has defined behaviour when the number is not
representable).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/webmdashenc.c