mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
efc323062c
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> |
||
---|---|---|
.. | ||
cmdutils.c | ||
cmdutils.h | ||
ffmpeg_filter.c | ||
ffmpeg_hw.c | ||
ffmpeg_opt.c | ||
ffmpeg.c | ||
ffmpeg.h | ||
ffplay.c | ||
ffprobe.c | ||
Makefile |