diff mbox series

[FFmpeg-devel,42/47] fftools/ffprobe: replace report_and_exit() with returning error codes

Message ID 20230715104611.17902-42-anton@khirnov.net
State Accepted
Commit 140cb5a74294f62343f327049057089a3e3abf5b
Headers show
Series [FFmpeg-devel,01/47] fftools/ffmpeg_mux_init: handle pixel format endianness | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov July 15, 2023, 10:46 a.m. UTC
---
 fftools/ffprobe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index c83d20995e..6180a5c952 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -3350,7 +3350,7 @@  static int open_input_file(InputFile *ifile, const char *filename,
 
     fmt_ctx = avformat_alloc_context();
     if (!fmt_ctx)
-        report_and_exit(AVERROR(ENOMEM));
+        return 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);
@@ -3377,7 +3377,7 @@  static int open_input_file(InputFile *ifile, const char *filename,
 
         err = setup_find_stream_info_opts(fmt_ctx, codec_opts, &opts);
         if (err < 0)
-            report_and_exit(err);
+            return err;
 
         err = avformat_find_stream_info(fmt_ctx, opts);