diff mbox

[FFmpeg-devel,2/2] avformat/hlsenc: reindent hlsenc code

Message ID 20171027001130.36902-1-lq@chinaffmpeg.org
State Accepted
Commit 073986c5aeb84e51b202f908d5ede059d371d57b
Headers show

Commit Message

Steven Liu Oct. 27, 2017, 12:11 a.m. UTC
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/hlsenc.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Comments

Steven Liu Oct. 29, 2017, 5:27 a.m. UTC | #1
> 在 2017年10月27日,上午8:11,Steven Liu <lq@chinaffmpeg.org> 写道:
> 
> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
> ---
> libavformat/hlsenc.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 530fc11305..0ea93480a5 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -1081,13 +1081,13 @@ static int hls_window(AVFormatContext *s, int last)
>             }
>             avio_printf(out, "\n");
>         }
> -            if (hls->flags & HLS_ROUND_DURATIONS)
> -                avio_printf(out, "#EXTINF:%ld,\n",  lrint(en->duration));
> -            else
> -                avio_printf(out, "#EXTINF:%f,\n", en->duration);
> -            if (byterange_mode)
> -                avio_printf(out, "#EXT-X-BYTERANGE:%"PRId64"@%"PRId64"\n",
> -                            en->size, en->pos);
> +        if (hls->flags & HLS_ROUND_DURATIONS)
> +            avio_printf(out, "#EXTINF:%ld,\n",  lrint(en->duration));
> +        else
> +            avio_printf(out, "#EXTINF:%f,\n", en->duration);
> +        if (byterange_mode)
> +            avio_printf(out, "#EXT-X-BYTERANGE:%"PRId64"@%"PRId64"\n",
> +                        en->size, en->pos);
> 
>         if (hls->flags & HLS_PROGRAM_DATE_TIME) {
>             time_t tt, wrongsecs;
> @@ -1113,9 +1113,9 @@ static int hls_window(AVFormatContext *s, int last)
>             avio_printf(out, "#EXT-X-PROGRAM-DATE-TIME:%s.%03d%s\n", buf0, milli, buf1);
>             prog_date_time += en->duration;
>         }
> -            if (hls->baseurl)
> -                avio_printf(out, "%s", hls->baseurl);
> -            avio_printf(out, "%s\n", en->filename);
> +        if (hls->baseurl)
> +            avio_printf(out, "%s", hls->baseurl);
> +        avio_printf(out, "%s\n", en->filename);
>     }
> 
>     if (last && (hls->flags & HLS_OMIT_ENDLIST)==0)
> -- 
> 2.11.0 (Apple Git-81)
> 
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Applied!


Thanks
diff mbox

Patch

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 530fc11305..0ea93480a5 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1081,13 +1081,13 @@  static int hls_window(AVFormatContext *s, int last)
             }
             avio_printf(out, "\n");
         }
-            if (hls->flags & HLS_ROUND_DURATIONS)
-                avio_printf(out, "#EXTINF:%ld,\n",  lrint(en->duration));
-            else
-                avio_printf(out, "#EXTINF:%f,\n", en->duration);
-            if (byterange_mode)
-                avio_printf(out, "#EXT-X-BYTERANGE:%"PRId64"@%"PRId64"\n",
-                            en->size, en->pos);
+        if (hls->flags & HLS_ROUND_DURATIONS)
+            avio_printf(out, "#EXTINF:%ld,\n",  lrint(en->duration));
+        else
+            avio_printf(out, "#EXTINF:%f,\n", en->duration);
+        if (byterange_mode)
+            avio_printf(out, "#EXT-X-BYTERANGE:%"PRId64"@%"PRId64"\n",
+                        en->size, en->pos);
 
         if (hls->flags & HLS_PROGRAM_DATE_TIME) {
             time_t tt, wrongsecs;
@@ -1113,9 +1113,9 @@  static int hls_window(AVFormatContext *s, int last)
             avio_printf(out, "#EXT-X-PROGRAM-DATE-TIME:%s.%03d%s\n", buf0, milli, buf1);
             prog_date_time += en->duration;
         }
-            if (hls->baseurl)
-                avio_printf(out, "%s", hls->baseurl);
-            avio_printf(out, "%s\n", en->filename);
+        if (hls->baseurl)
+            avio_printf(out, "%s", hls->baseurl);
+        avio_printf(out, "%s\n", en->filename);
     }
 
     if (last && (hls->flags & HLS_OMIT_ENDLIST)==0)