FFmpeg/libavformat
Andreas Rheinhardt 06f99cc4dd avformat/segment: Fix segfault on allocation error, avoid allocation
If the user has set none of the options specifying the segments'
durations, a default value of 2s is used by duplicating a "2" string and
using av_parse_time() on it. Yet duplicating the string was unchecked
and if the allocation failed, one would get a segfault in
av_parse_time().

This commit solves this by turning said option into an option of type
AV_OPT_TYPE_DURATION (which also uses av_parse_time() internally),
avoiding duplicating the string altogether.

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-09-10 13:43:43 +02:00
..
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2019-12-12 19:25:33 +01:00
2020-03-17 16:05:49 +01:00
2019-12-25 22:10:47 +01:00
2020-06-22 12:19:56 +02:00
2019-12-12 19:25:33 +01:00
2020-03-17 16:04:42 +01:00
2020-03-17 16:08:13 +01:00
2020-08-18 07:03:00 +02:00
2020-09-04 16:01:53 +02:00
2020-05-31 00:55:12 +02:00
2020-06-18 21:31:13 +02:00
2020-09-03 18:11:00 +02:00
2020-09-03 18:10:28 +02:00
2019-12-12 19:25:33 +01:00
2020-04-19 02:37:46 +02:00
2020-09-03 18:03:18 +02:00
2019-12-12 19:25:33 +01:00
2020-03-17 22:46:36 +01:00
2019-12-12 19:25:33 +01:00
2020-06-06 00:25:00 +02:00
2020-06-06 00:25:00 +02:00
2020-05-19 20:09:25 +02:00
2020-02-16 12:54:57 +01:00
2020-01-08 01:32:26 +01:00
2019-12-12 19:25:33 +01:00
2020-06-04 10:52:42 +02:00
2020-06-13 00:43:09 +02:00
2020-02-20 14:41:26 +01:00
2020-03-12 18:47:39 +01:00
2020-07-26 16:47:01 +02:00