mirror of https://git.ffmpeg.org/ffmpeg.git
ffmpeg: Check for subtitle_out malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4f1923a91b
commit
d2f9aefbde
4
ffmpeg.c
4
ffmpeg.c
|
@ -819,6 +819,10 @@ static void do_subtitle_out(AVFormatContext *s,
|
||||||
|
|
||||||
if (!subtitle_out) {
|
if (!subtitle_out) {
|
||||||
subtitle_out = av_malloc(subtitle_out_max_size);
|
subtitle_out = av_malloc(subtitle_out_max_size);
|
||||||
|
if (!subtitle_out) {
|
||||||
|
av_log(NULL, AV_LOG_FATAL, "Failed to allocate subtitle_out\n");
|
||||||
|
exit_program(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note: DVB subtitle need one packet to draw them and one other
|
/* Note: DVB subtitle need one packet to draw them and one other
|
||||||
|
|
Loading…
Reference in New Issue