diff mbox series

[FFmpeg-devel,01/18] libavformat/utils: Fix indentation

Message ID 20210319055904.2264501-1-andreas.rheinhardt@gmail.com
State Accepted
Commit e375e09d8230ce356ff0b5b29f2ed355d375fda0
Headers show
Series [FFmpeg-devel,01/18] libavformat/utils: Fix indentation | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt March 19, 2021, 5:58 a.m. UTC
Originally added in 12f996edfab67b65af0ff1ee829f9eeabb025b0f
behind #if 0; aebb56e1844d61965c97e95534c3ae0da69df028 then
removed the #if and replaced it by using av_dlog. Then commit
1a3eb042c704dea190c644def5b32c9cee8832b8 replaced this with av_log
at trace level. Yet the code block always stayed within { }
at an increased level of indentation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/utils.c | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

Comments

Andreas Rheinhardt March 22, 2021, 7:15 p.m. UTC | #1
Andreas Rheinhardt:
> Originally added in 12f996edfab67b65af0ff1ee829f9eeabb025b0f
> behind #if 0; aebb56e1844d61965c97e95534c3ae0da69df028 then
> removed the #if and replaced it by using av_dlog. Then commit
> 1a3eb042c704dea190c644def5b32c9cee8832b8 replaced this with av_log
> at trace level. Yet the code block always stayed within { }
> at an increased level of indentation.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/utils.c | 30 +++++++++++++-----------------
>  1 file changed, 13 insertions(+), 17 deletions(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 295e676c9c..d9a08c9ccd 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -2945,23 +2945,19 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
>      }
>      update_stream_timings(ic);
>  
> -    {
> -        int i;
> -        AVStream av_unused *st;
> -        for (i = 0; i < ic->nb_streams; i++) {
> -            st = ic->streams[i];
> -            if (st->time_base.den)
> -                av_log(ic, AV_LOG_TRACE, "stream %d: start_time: %s duration: %s\n", i,
> -                       av_ts2timestr(st->start_time, &st->time_base),
> -                       av_ts2timestr(st->duration, &st->time_base));
> -        }
> -        av_log(ic, AV_LOG_TRACE,
> -               "format: start_time: %s duration: %s (estimate from %s) bitrate=%"PRId64" kb/s\n",
> -               av_ts2timestr(ic->start_time, &AV_TIME_BASE_Q),
> -               av_ts2timestr(ic->duration, &AV_TIME_BASE_Q),
> -               duration_estimate_name(ic->duration_estimation_method),
> -               (int64_t)ic->bit_rate / 1000);
> -    }
> +    for (unsigned i = 0; i < ic->nb_streams; i++) {
> +        AVStream *st = ic->streams[i];
> +        if (st->time_base.den)
> +            av_log(ic, AV_LOG_TRACE, "stream %u: start_time: %s duration: %s\n", i,
> +                   av_ts2timestr(st->start_time, &st->time_base),
> +                   av_ts2timestr(st->duration, &st->time_base));
> +    }
> +    av_log(ic, AV_LOG_TRACE,
> +           "format: start_time: %s duration: %s (estimate from %s) bitrate=%"PRId64" kb/s\n",
> +           av_ts2timestr(ic->start_time, &AV_TIME_BASE_Q),
> +           av_ts2timestr(ic->duration, &AV_TIME_BASE_Q),
> +           duration_estimate_name(ic->duration_estimation_method),
> +           (int64_t)ic->bit_rate / 1000);
>  }
>  
>  static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)
> 
Will apply this patchset tomorrow unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 295e676c9c..d9a08c9ccd 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2945,23 +2945,19 @@  static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
     }
     update_stream_timings(ic);
 
-    {
-        int i;
-        AVStream av_unused *st;
-        for (i = 0; i < ic->nb_streams; i++) {
-            st = ic->streams[i];
-            if (st->time_base.den)
-                av_log(ic, AV_LOG_TRACE, "stream %d: start_time: %s duration: %s\n", i,
-                       av_ts2timestr(st->start_time, &st->time_base),
-                       av_ts2timestr(st->duration, &st->time_base));
-        }
-        av_log(ic, AV_LOG_TRACE,
-               "format: start_time: %s duration: %s (estimate from %s) bitrate=%"PRId64" kb/s\n",
-               av_ts2timestr(ic->start_time, &AV_TIME_BASE_Q),
-               av_ts2timestr(ic->duration, &AV_TIME_BASE_Q),
-               duration_estimate_name(ic->duration_estimation_method),
-               (int64_t)ic->bit_rate / 1000);
-    }
+    for (unsigned i = 0; i < ic->nb_streams; i++) {
+        AVStream *st = ic->streams[i];
+        if (st->time_base.den)
+            av_log(ic, AV_LOG_TRACE, "stream %u: start_time: %s duration: %s\n", i,
+                   av_ts2timestr(st->start_time, &st->time_base),
+                   av_ts2timestr(st->duration, &st->time_base));
+    }
+    av_log(ic, AV_LOG_TRACE,
+           "format: start_time: %s duration: %s (estimate from %s) bitrate=%"PRId64" kb/s\n",
+           av_ts2timestr(ic->start_time, &AV_TIME_BASE_Q),
+           av_ts2timestr(ic->duration, &AV_TIME_BASE_Q),
+           duration_estimate_name(ic->duration_estimation_method),
+           (int64_t)ic->bit_rate / 1000);
 }
 
 static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)