[FFmpeg-devel,4/4] avformat/hashenc: reindent after previous commit

Submitted by Moritz Barsnick on Aug. 11, 2019, 12:47 p.m.

Details

Message ID 51d7e39b0efa57976e605af26f7e3c564e04b328.1565527501.git.barsnick@gmx.net
State New
Headers show

Commit Message

Moritz Barsnick Aug. 11, 2019, 12:47 p.m.
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
---
 libavformat/hashenc.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

--
2.20.1

Patch hide | download patch | download mbox

diff --git a/libavformat/hashenc.c b/libavformat/hashenc.c
index 394b8a0fce..070d4001b1 100644
--- a/libavformat/hashenc.c
+++ b/libavformat/hashenc.c
@@ -86,10 +86,10 @@  static int hash_write_header(struct AVFormatContext *s)
     if (!c->hashes)
         return AVERROR(ENOMEM);
     for (i = 0; i < num_hashes; i++) {
-    res = av_hash_alloc(&c->hashes[i], c->hash_name);
-    if (res < 0)
-        goto err;
-    av_hash_init(c->hashes[i]);
+        res = av_hash_alloc(&c->hashes[i], c->hash_name);
+        if (res < 0)
+            goto err;
+        av_hash_init(c->hashes[i]);
     }
     return 0;
 err:
@@ -111,18 +111,18 @@  static int hash_write_trailer(struct AVFormatContext *s)
     struct HashContext *c = s->priv_data;
     int num_hashes = c->per_stream ? s->nb_streams : 1;
     for (int i = 0; i < num_hashes; i++) {
-    char buf[AV_HASH_MAX_SIZE*2+128];
-    if (c->per_stream) {
-        snprintf(buf, sizeof(buf) - 200, "%d,%s=", i, av_hash_get_name(c->hashes[i]));
-    } else {
-        snprintf(buf, sizeof(buf) - 200, "%s=", av_hash_get_name(c->hashes[i]));
-    }
-    av_hash_final_hex(c->hashes[i], buf + strlen(buf), sizeof(buf) - strlen(buf));
-    av_strlcatf(buf, sizeof(buf), "\n");
-    avio_write(s->pb, buf, strlen(buf));
-    avio_flush(s->pb);
+        char buf[AV_HASH_MAX_SIZE*2+128];
+        if (c->per_stream) {
+            snprintf(buf, sizeof(buf) - 200, "%d,%s=", i, av_hash_get_name(c->hashes[i]));
+        } else {
+            snprintf(buf, sizeof(buf) - 200, "%s=", av_hash_get_name(c->hashes[i]));
+        }
+        av_hash_final_hex(c->hashes[i], buf + strlen(buf), sizeof(buf) - strlen(buf));
+        av_strlcatf(buf, sizeof(buf), "\n");
+        avio_write(s->pb, buf, strlen(buf));
+        avio_flush(s->pb);

-    av_hash_freep(&c->hashes[i]);
+        av_hash_freep(&c->hashes[i]);
     }
     av_freep(&c->hashes);
     return 0;