diff mbox series

[FFmpeg-devel,1/4] lavf/astenc: fix weird indent, use braces in else statements

Message ID 20240110213715.450452-1-stefasab@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/4] lavf/astenc: fix weird indent, use braces in else statements | 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

Stefano Sabatini Jan. 10, 2024, 9:37 p.m. UTC
Braces are employed to improve readability.
---
 libavformat/astenc.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/astenc.c b/libavformat/astenc.c
index 259948b276..250a54b573 100644
--- a/libavformat/astenc.c
+++ b/libavformat/astenc.c
@@ -143,14 +143,16 @@  static int ast_write_trailer(AVFormatContext *s)
 
         /* Loopstart if provided */
         if (ast->loopstart > 0) {
-        if (ast->loopstart >= samples) {
-            av_log(s, AV_LOG_WARNING, "Loopstart value is out of range and will be ignored\n");
-            ast->loopstart = -1;
-            avio_skip(pb, 4);
-        } else
-        avio_wb32(pb, ast->loopstart);
-        } else
+            if (ast->loopstart >= samples) {
+                av_log(s, AV_LOG_WARNING, "Loopstart value is out of range and will be ignored\n");
+                ast->loopstart = -1;
+                avio_skip(pb, 4);
+            } else {
+                avio_wb32(pb, ast->loopstart);
+            }
+        } else {
             avio_skip(pb, 4);
+        }
 
         /* Loopend if provided. Otherwise number of samples again */
         if (ast->loopend && ast->loopstart >= 0) {