summaryrefslogtreecommitdiff
path: root/fftools/cmdutils.c
diff options
context:
space:
mode:
authorYu Yang <yuyang14@kuaishou.com>2021-12-15 10:47:28 +0800
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-16 11:56:00 +0100
commita4580bf95985e033eb8857156db3670eeec48131 (patch)
tree91c8b151be2b0e3fe12800bc061d2f030f0edd9a /fftools/cmdutils.c
parent3f46ffe956a563a975b65fcb0bcf131fd30956ff (diff)
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>
Diffstat (limited to 'fftools/cmdutils.c')
-rw-r--r--fftools/cmdutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 3c8e5a82cd..882584e9c2 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -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,