[FFmpeg-devel,2/5] avformat/hlsenc: reindent after previous commits

Submitted by Steven Liu on March 12, 2018, 6:34 a.m.

Details

Message ID 20180312063446.13988-1-lq@chinaffmpeg.org
State Accepted
Commit 10a0436dcab3dd51d70c391ba299f9a7e8521018
Headers show

Commit Message

Steven Liu March 12, 2018, 6:34 a.m.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/hlsenc.c | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

Patch hide | download patch | download mbox

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 9c5798b557..7ca4099e7e 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -2581,32 +2581,32 @@  static int hls_init(AVFormatContext *s)
             }
             av_strlcpy(vs->fmp4_init_filename, hls->fmp4_init_filename,
                        fmp4_init_filename_len);
-                if (hls->nb_varstreams > 1) {
-                    ret = append_postfix(vs->fmp4_init_filename, fmp4_init_filename_len, i);
-                    if (ret < 0)
-                         goto fail;
-                }
+            if (hls->nb_varstreams > 1) {
+                ret = append_postfix(vs->fmp4_init_filename, fmp4_init_filename_len, i);
+                if (ret < 0)
+                    goto fail;
+            }
 
-                fmp4_init_filename_len = strlen(vs->m3u8_name) +
-                    strlen(vs->fmp4_init_filename) + 1;
+            fmp4_init_filename_len = strlen(vs->m3u8_name) +
+                strlen(vs->fmp4_init_filename) + 1;
 
-                vs->base_output_dirname = av_malloc(fmp4_init_filename_len);
-                if (!vs->base_output_dirname) {
-                    ret = AVERROR(ENOMEM);
-                    goto fail;
-                }
+            vs->base_output_dirname = av_malloc(fmp4_init_filename_len);
+            if (!vs->base_output_dirname) {
+                ret = AVERROR(ENOMEM);
+                goto fail;
+            }
 
-                av_strlcpy(vs->base_output_dirname, vs->m3u8_name,
+            av_strlcpy(vs->base_output_dirname, vs->m3u8_name,
+                       fmp4_init_filename_len);
+            p = strrchr(vs->base_output_dirname, '/');
+            if (p) {
+                *(p + 1) = '\0';
+                av_strlcat(vs->base_output_dirname, vs->fmp4_init_filename,
                            fmp4_init_filename_len);
-                p = strrchr(vs->base_output_dirname, '/');
-                if (p) {
-                    *(p + 1) = '\0';
-                    av_strlcat(vs->base_output_dirname, vs->fmp4_init_filename,
-                               fmp4_init_filename_len);
-                } else {
-                    av_strlcpy(vs->base_output_dirname, vs->fmp4_init_filename,
-                               fmp4_init_filename_len);
-                }
+            } else {
+                av_strlcpy(vs->base_output_dirname, vs->fmp4_init_filename,
+                           fmp4_init_filename_len);
+            }
         }
 
         if (!hls->use_localtime) {