diff mbox series

[FFmpeg-devel,22/47] fftools/ffmpeg_filter: replace remaining report_and_exit() with error codes

Message ID 20230715104611.17902-22-anton@khirnov.net
State Accepted
Commit 13ebc9a0a9b6b67e7bd896a729d9651a24373135
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:45 a.m. UTC
---
 fftools/ffmpeg_filter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 470d7b1f02..26aff9c328 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -723,14 +723,14 @@  static InputFilter *ifilter_alloc(FilterGraph *fg)
 
     ifp->frame = av_frame_alloc();
     if (!ifp->frame)
-        report_and_exit(AVERROR(ENOMEM));
+        return NULL;
 
     ifp->format          = -1;
     ifp->fallback.format = -1;
 
     ifp->frame_queue = av_fifo_alloc2(8, sizeof(AVFrame*), AV_FIFO_FLAG_AUTO_GROW);
     if (!ifp->frame_queue)
-        report_and_exit(AVERROR(ENOMEM));
+        return NULL;
 
     return ifilter;
 }
@@ -1781,7 +1781,7 @@  int reap_filters(FilterGraph *fg, int flush)
             fd = frame_data(filtered_frame);
             if (!fd) {
                 av_frame_unref(filtered_frame);
-                report_and_exit(AVERROR(ENOMEM));
+                return AVERROR(ENOMEM);
             }
 
             // only use bits_per_raw_sample passed through from the decoder