summaryrefslogtreecommitdiff
path: root/fftools/ffprobe.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-27 15:41:16 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-01 14:26:00 +0200
commit601faaed92de2fb036463b647d5b26cb7c649002 (patch)
tree53155f999daa156a25c28bc3ce8f31add517ccc7 /fftools/ffprobe.c
parente157b21a9081e3c4e8e22a4ae764dfbf0cc5b5b3 (diff)
downloadffmpeg-601faaed92de2fb036463b647d5b26cb7c649002.tar.gz
fftools: Use report_error_then_exit_program() for allocation failures
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'fftools/ffprobe.c')
-rw-r--r--fftools/ffprobe.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 8983dc28cc..3344a06409 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -3291,10 +3291,8 @@ static int open_input_file(InputFile *ifile, const char *filename,
int scan_all_pmts_set = 0;
fmt_ctx = avformat_alloc_context();
- if (!fmt_ctx) {
- print_error(filename, AVERROR(ENOMEM));
- exit_program(1);
- }
+ if (!fmt_ctx)
+ report_and_exit(AVERROR(ENOMEM));
if (!av_dict_get(format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) {
av_dict_set(&format_opts, "scan_all_pmts", "1", AV_DICT_DONT_OVERWRITE);