1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
FFmpeg/fftools
Andreas Rheinhardt efc323062c fftools/ffmpeg_filter: Avoid DynBuf API to improve error checks
choose_pix_fmts() used the dynamic buffer API to write strings;
as is common among uses of this API, only opening the dynamic buffer
was checked, but not the end result, leading to crashes in case
of allocation failure.
Furthermore, some static strings were duplicated; the allocations
performed here were not properly checked: Allocation failure would
be treated as "could not determine pixel format".
The first issue is fixed by switching to the AVBPrint API which allows
to easily perform checks at the end. Furthermore, the internal buffer
avoids almost all allocations in case the AVBPrint is used.
The AVBPrint also allows to solve the second issue in an elegant way,
because it allows to return the static strings directly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-03 16:12:52 +01:00
..
cmdutils.c fftools: Constify values from av_dict_get() 2021-11-18 19:43:32 +01:00
cmdutils.h cmdutils: add an option for listing stream dispositions 2021-11-16 10:51:32 +01:00
ffmpeg_filter.c fftools/ffmpeg_filter: Avoid DynBuf API to improve error checks 2021-12-03 16:12:52 +01:00
ffmpeg_hw.c ffmpeg_hw: make hardware selection for filters more user friendly 2021-09-12 13:33:50 -03:00
ffmpeg_opt.c fftools/ffmpeg_opt: Don't set source_index redundantly 2021-11-30 12:06:02 +01:00
ffmpeg.c ffmpeg: fix usage of -shortest in codec copy scenarios 2021-12-01 18:16:56 -03:00
ffmpeg.h fftools/ffmpeg_opt: Don't duplicate array unnecessarily 2021-11-30 11:53:22 +01:00
ffplay.c fftools: Constify values from av_dict_get() 2021-11-18 19:43:32 +01:00
ffprobe.c fftools/ffprobe: print size of attachment streams (extradata_size) 2021-11-29 21:30:11 +01:00
Makefile ffmpeg: remove ffmpeg_videotoolbox 2021-11-28 16:40:43 -06:00