Andreas Rheinhardt
08cd00a86f
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>
(cherry picked from commit 06f99cc4ddbb16f8fd9ae3d72835d542be3dbab2)
2021-02-27 07:21:00 +01:00
..
2020-10-28 21:41:21 +01:00
2021-02-20 14:21:24 +01:00
2021-02-20 14:21:24 +01:00
2020-05-25 07:06:44 +02:00
2020-05-21 09:31:08 +02:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2020-05-25 05:38:15 +02:00
2020-05-31 00:55:12 +02:00
2020-11-08 00:26:11 +10:00
2021-02-02 14:18:20 +01:00
2021-02-27 07:20:59 +01:00
2020-06-15 17:25:46 +02:00
2020-11-08 00:16:49 +10:00
2021-02-20 14:21:24 +01:00
2021-02-27 07:20:59 +01:00
2020-06-15 17:25:46 +02:00
2020-05-25 13:11:36 +02:00
2021-02-02 14:18:21 +01:00
2020-07-01 19:00:19 +02:00
2020-07-01 19:00:19 +02:00
2020-05-23 01:40:05 +02:00
2021-02-27 07:20:58 +01:00
2020-07-01 18:59:27 +02:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2020-05-25 13:11:36 +02:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:20 +01:00
2020-05-25 13:11:36 +02:00
2021-02-02 14:18:21 +01:00
2020-05-25 13:11:36 +02:00
2021-02-27 07:20:59 +01:00
2020-06-01 18:58:04 +05:30
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:20 +01:00
2021-02-20 14:21:24 +01:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2020-05-25 11:59:45 +02:00
2020-05-25 11:59:45 +02:00
2020-05-25 11:59:45 +02:00
2021-02-27 07:20:59 +01:00
2021-02-20 14:21:24 +01:00
2021-02-02 14:18:21 +01:00
2020-05-25 13:11:36 +02:00
2021-02-02 14:18:21 +01:00
2021-02-27 07:20:59 +01:00
2020-06-15 05:35:07 +02:00
2020-05-28 11:18:53 +02:00
2020-05-28 11:18:53 +02:00
2020-05-25 13:11:36 +02:00
2020-05-21 22:45:21 +02:00
2020-05-25 13:11:36 +02:00
2021-02-02 14:18:21 +01:00
2021-02-20 14:21:24 +01:00
2020-05-25 07:06:44 +02:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2020-05-30 18:02:55 +02:00
2020-05-28 12:03:28 +02:00
2020-05-19 20:09:25 +02:00
2021-02-27 07:20:58 +01:00
2021-02-02 14:18:21 +01:00
2020-10-28 21:41:04 +01:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2020-05-31 00:55:12 +02:00
2021-02-22 21:56:57 +01:00
2020-06-15 17:30:33 +02:00
2020-07-02 10:20:36 +02:00
2021-02-27 07:20:56 +01:00
2020-07-10 20:52:00 +02:00
2020-05-25 13:11:36 +02:00
2020-05-25 13:11:36 +02:00
2021-02-20 14:21:24 +01:00
2021-02-27 07:20:58 +01:00
2020-06-08 22:08:37 +02:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:20 +01:00
2021-02-27 07:20:59 +01:00
2021-02-22 22:00:29 +01:00
2020-05-31 18:43:02 +02:00
2020-06-15 17:25:47 +02:00
2021-02-02 14:18:21 +01:00
2020-05-23 05:43:42 +02:00
2021-02-20 14:21:24 +01:00
2021-02-02 14:18:21 +01:00
2021-02-22 21:55:42 +01:00
2021-02-27 07:20:59 +01:00
2021-02-02 14:18:21 +01:00
2021-02-20 14:21:24 +01:00
2021-02-02 14:18:21 +01:00
2020-06-14 22:02:34 +02:00
2020-05-23 19:07:20 +01:00
2020-05-31 00:52:08 +02:00
2020-05-28 12:04:26 +02:00
2020-06-15 17:25:46 +02:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2020-06-15 17:25:47 +02:00
2020-06-14 21:09:05 +02:00
2021-02-20 14:21:24 +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
2021-02-27 07:20:58 +01:00
2021-02-02 14:18:21 +01:00
2021-02-02 14:18:21 +01:00
2020-05-25 13:11:36 +02:00
2020-05-25 13:11:36 +02:00
2020-05-25 13:11:36 +02:00
2020-06-02 22:25:11 +08:00
2020-05-25 13:11:36 +02:00
2020-06-02 22:25:11 +08:00
2021-02-20 14:21:24 +01:00
2020-05-25 13:11:36 +02:00
2020-05-25 13:11:36 +02:00
2021-02-02 14:18:22 +01:00
2020-06-15 17:30:28 +02:00
2020-07-10 20:52:00 +02:00
2021-02-02 14:18:21 +01:00
2021-02-27 07:21:00 +01:00
2021-02-22 22:00:15 +01:00
2021-02-02 14:18:20 +01:00
2021-02-02 14:18:22 +01:00
2020-07-09 12:35:39 +02:00
2020-05-25 13:11:36 +02:00
2021-02-02 14:18:22 +01:00
2021-02-27 07:20:59 +01:00
2020-06-15 17:30:32 +02:00
2020-05-25 13:11:36 +02:00
2020-06-15 17:30:32 +02:00
2020-05-25 13:11:36 +02:00
2020-06-15 17:30:32 +02:00
2021-02-02 14:18:20 +01:00
2021-02-27 07:20:58 +01:00
2021-02-27 07:20:58 +01:00
2021-02-27 07:20:58 +01:00
2020-06-04 10:52:42 +02:00
2020-06-14 22:02:34 +02:00
2020-05-25 13:11:36 +02:00
2020-05-25 13:11:36 +02:00
2020-05-25 13:11:36 +02:00
2020-05-25 13:11:36 +02:00
2020-05-25 13:11:36 +02:00
2021-02-02 14:18:22 +01:00
2020-05-21 05:30:26 +02:00
2020-12-30 23:45:03 +01:00
2020-09-08 20:15:23 +02:00
2021-02-27 07:20:59 +01:00
2020-06-08 22:49:04 +02:00
2021-02-22 21:59:42 +01:00
2020-06-15 17:30:33 +02:00
2021-02-02 14:18:21 +01:00
2021-02-20 14:21:24 +01:00
2021-02-27 07:20:59 +01:00
2021-02-02 14:18:20 +01:00
2020-05-23 07:15:35 +02:00
2021-02-22 21:57:27 +01:00
2020-06-15 17:30:33 +02:00
2021-02-20 14:21:24 +01:00
2021-02-02 14:18:20 +01:00
2021-02-02 14:18:21 +01:00