mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-06 01:07:36 +08:00
fftools/cmdutils: Avoid crash when opts could not be allocated
If 'opts' could not be allocated, exiting the program to avoid crash when release it. Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Signed-off-by: Yu Yang <yuyang14@kuaishou.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:

committed by
Andreas Rheinhardt

parent
3f46ffe956
commit
a4580bf959
@@ -2187,7 +2187,7 @@ AVDictionary **setup_find_stream_info_opts(AVFormatContext *s,
|
||||
if (!opts) {
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"Could not alloc memory for stream options.\n");
|
||||
return NULL;
|
||||
exit_program(1);
|
||||
}
|
||||
for (i = 0; i < s->nb_streams; i++)
|
||||
opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codecpar->codec_id,
|
||||
|
Reference in New Issue
Block a user