[FFmpeg-cvslog] fftools/ffmpeg: drop a useless goto

Anton Khirnov git at videolan.org
Thu Apr 13 16:41:58 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Mar 28 09:31:56 2023 +0200| [f2c8dff9067ce04bf9db44dcae95f1649a623217] | committer: Anton Khirnov

fftools/ffmpeg: drop a useless goto

There is no cleanup in transcode(), can return an error directly.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f2c8dff9067ce04bf9db44dcae95f1649a623217
---

 fftools/ffmpeg.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 1f50b82794..1cd9a8f29f 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2905,7 +2905,7 @@ static int transcode(void)
 
     ret = transcode_init();
     if (ret < 0)
-        goto fail;
+        return ret;
 
     if (stdin_interaction) {
         av_log(NULL, AV_LOG_INFO, "Press [q] to stop, [?] for help\n");
@@ -2975,11 +2975,7 @@ static int transcode(void)
 
     hw_device_free_all();
 
-    /* finished ! */
-    ret = 0;
-
- fail:
-    return ret;
+    return 0;
 }
 
 static BenchmarkTimeStamps get_benchmark_time_stamps(void)



More information about the ffmpeg-cvslog mailing list