diff mbox series

[FFmpeg-devel,07/29] fftools/ffmpeg: drop a useless goto

Message ID 20230409140853.28858-7-anton@khirnov.net
State Accepted
Commit f2c8dff9067ce04bf9db44dcae95f1649a623217
Headers show
Series [FFmpeg-devel,01/29] fftools/ffmpeg: move OutputStream.vsync_frame_number to Encoder | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov April 9, 2023, 2:08 p.m. UTC
There is no cleanup in transcode(), can return an error directly.
---
 fftools/ffmpeg.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

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)