ffmpeg/fftools
Andreas Rheinhardt ced5c5fdb8 fftools/ffmpeg_mux_init: Fix double-free on error
MATCH_PER_STREAM_OPT iterates over all options of a given
OptionDef and tests whether they apply to the current stream;
if so, they are set to ost->apad, otherwise, the code errors
out. If no error happens, ost->apad is av_strdup'ed in order
to take ownership of this pointer.

But this means that setting it originally was premature,
as it leads to double-frees when an error happens lateron.
This can simply be reproduced with
ffmpeg -filter_complex anullsrc  -apad bar -apad:n baz -f null -
This is a regression since 83ace80bfd.

Fix this by using a temporary variable instead of directly
setting ost->apad. Also only strdup the string if it actually
is != NULL.

Reviewed-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-26 06:48:35 +01:00
..
Makefile
cmdutils.c fftools/ffmpeg: add loopback decoding 2024-03-13 08:01:27 +01:00
cmdutils.h fftools/ffmpeg: add loopback decoding 2024-03-13 08:01:27 +01:00
ffmpeg.c fftools/ffmpeg: add loopback decoding 2024-03-13 08:01:27 +01:00
ffmpeg.h fftools/ffmpeg_filter: remove prototype for non existent function 2024-03-25 23:23:27 -03:00
ffmpeg_dec.c ffmpeg: set extra_hw_frames to account for frames held in queues 2024-03-19 22:56:56 +00:00
ffmpeg_demux.c fftools/ffmpeg: remove unncessary casts for *_thread() return values 2024-03-13 08:01:15 +01:00
ffmpeg_enc.c fftools/ffmpeg_enc: Don't call frame_data twice 2024-03-22 22:11:04 +01:00
ffmpeg_filter.c fftools/ffmpeg_filter: remove unused struct from InputFilterPriv 2024-03-25 23:23:27 -03:00
ffmpeg_hw.c fftools/ffmpeg: move hwaccel_retrieve_data() from ffmpeg_hw to ffmpeg_dec 2024-01-30 09:52:00 +01:00
ffmpeg_mux.c fftools/ffmpeg_enc: set AV_PKT_FLAG_TRUSTED on encoded packets 2024-03-13 08:01:28 +01:00
ffmpeg_mux.h fftools/ffmpeg: cosmetics, vertically align structs 2024-02-21 10:33:20 +01:00
ffmpeg_mux_init.c fftools/ffmpeg_mux_init: Fix double-free on error 2024-03-26 06:48:35 +01:00
ffmpeg_opt.c fftools/ffmpeg_opt: Check before accessing union member 2024-03-17 15:10:05 +01:00
ffmpeg_sched.c ffmpeg: set extra_hw_frames to account for frames held in queues 2024-03-19 22:56:56 +00:00
ffmpeg_sched.h ffmpeg: set extra_hw_frames to account for frames held in queues 2024-03-19 22:56:56 +00:00
ffmpeg_utils.h
ffplay.c fftools/ffplay: use correct buffersink channel layout parameters 2024-03-19 20:48:22 +01:00
ffplay_renderer.c Revert "all: Don't set AVClass.item_name to its default value" 2024-01-20 10:34:48 +01:00
ffplay_renderer.h
ffprobe.c ffprobe: adapt to new AVFilmGrainParams 2024-03-23 18:54:36 +01:00
fftools.manifest
fftoolsres.rc
fopen_utf8.h
objpool.c
objpool.h
opt_common.c fftools/opt_common: show if muxer is device 2024-03-11 16:52:42 +01:00
opt_common.h fftools/cmdutils: hide some information listing options from basic help 2024-01-20 10:37:32 +01:00
sync_queue.c fftools/ffmpeg_demux, sync_queue: Constify a bit 2024-03-02 02:51:59 +01:00
sync_queue.h
thread_queue.c
thread_queue.h