FFmpeg/libavutil
Andreas Rheinhardt aa7d6520e6 avutil/opt: Avoid av_strdup(NULL)
It is not documented to be safe and in any case it is nonsense:
Currently av_strdup(NULL) returns NULL and in order to distinguish
this from a genuine allocation failure, opt_copy_elem()
checked afterwards whether src was actually NULL. But then one
can simply check in advance whether one should call av_strdup()
at all.
set_string() was even worse and returned ENOMEM in case the value
to be duplicated is NULL; this only worked because
av_opt_set_defaults2() does not check the return value at all
(given that it can't propagate it).

These two places account for 389114 of 390356 av_strdup(NULL)
calls during one FATE run.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-28 03:08:01 +01:00
..
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-24 14:53:57 +01:00
2023-07-12 15:35:37 +02:00
2024-03-10 13:51:37 +01:00
2024-03-04 17:45:00 +01:00
2022-09-13 16:50:43 -03:00
2022-11-06 08:26:50 +01:00
2023-11-18 19:55:42 +01:00
2023-09-02 02:49:06 +02:00
2023-09-02 02:49:06 +02:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
2024-03-27 11:33:45 +01:00
2024-03-27 11:33:45 +01:00
2023-09-07 00:42:10 +02:00
2022-10-17 09:56:47 +02:00
2022-02-24 12:56:49 +01:00
2023-09-07 00:42:10 +02:00
2023-09-07 00:42:10 +02:00
2023-09-07 00:42:10 +02:00
2024-03-28 03:08:01 +01:00
2024-03-08 07:36:15 +01:00
2024-03-07 08:53:30 -03:00
2024-01-16 01:34:57 +01:00
2023-07-22 21:35:15 +03:00
2022-10-17 09:51:47 +02:00
2023-09-07 00:42:10 +02:00
2024-02-22 00:29:59 -03:00
2023-09-01 23:59:10 +02:00
2023-08-08 09:46:11 +02:00
2023-08-08 09:46:11 +02:00