---
 libavformat/concat.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavformat/concat.c b/libavformat/concat.c
index 416bbf5..7d3f2c5 100644
--- a/libavformat/concat.c
+++ b/libavformat/concat.c
@@ -21,9 +21,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "avformat.h"
 #include "libavutil/avstring.h"
 #include "libavutil/mem.h"
+
+#include "avformat.h"
 #include "url.h"
 
 #define AV_CAT_SEPARATOR "|"
@@ -74,9 +75,9 @@ static av_cold int concat_open(URLContext *h, const char 
*uri, int flags)
                 return AVERROR(ENAMETOOLONG);
             }
 
-    if (!(nodes = av_realloc(NULL, sizeof(*nodes) * len))) {
+    if (!(nodes = av_realloc(NULL, sizeof(*nodes) * len)))
         return AVERROR(ENOMEM);
-    } else
+    else
         data->nodes = nodes;
 
     /* handle input */
@@ -87,8 +88,8 @@ static av_cold int concat_open(URLContext *h, const char 
*uri, int flags)
         len = strcspn(uri, AV_CAT_SEPARATOR);
         if ((err = av_reallocp(&node_uri, len + 1)) < 0)
             break;
-        av_strlcpy(node_uri, uri, len+1);
-        uri += len + strspn(uri+len, AV_CAT_SEPARATOR);
+        av_strlcpy(node_uri, uri, len + 1);
+        uri += len + strspn(uri + len, AV_CAT_SEPARATOR);
 
         /* creating URLContext */
         if ((err = ffurl_open(&uc, node_uri, flags,
@@ -129,10 +130,11 @@ static int concat_read(URLContext *h, unsigned char *buf, 
int size)
         result = ffurl_read(nodes[i].uc, buf, size);
         if (result < 0)
             return total ? total : result;
-        if (!result)
+        if (!result) {
             if (i + 1 == data->length ||
                 ffurl_seek(nodes[++i].uc, 0, SEEK_SET) < 0)
                 break;
+        }
         total += result;
         buf   += result;
         size  -= result;
@@ -150,9 +152,7 @@ static int64_t concat_seek(URLContext *h, int64_t pos, int 
whence)
 
     switch (whence) {
     case SEEK_END:
-        for (i = data->length - 1;
-             i && pos < -nodes[i].size;
-             i--)
+        for (i = data->length - 1; i && pos < -nodes[i].size; i--)
             pos += nodes[i].size;
         break;
     case SEEK_CUR:
-- 
1.8.5.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to