Browse code

Cosmetics: use and place braces correctly in if ... else statements.

Originally committed as revision 23558 to svn://svn.ffmpeg.org/ffmpeg/trunk

Benoit Fouet authored on 2010/06/10 15:00:06
Showing 1 changed files
... ...
@@ -43,9 +43,9 @@ static int alloc_and_copy(uint8_t **poutbuf,          int *poutbuf_size,
43 43
     if (sps_pps)
44 44
         memcpy(*poutbuf+offset, sps_pps, sps_pps_size);
45 45
     memcpy(*poutbuf+sps_pps_size+nal_header_size+offset, in, in_size);
46
-    if (!offset)
46
+    if (!offset) {
47 47
         AV_WB32(*poutbuf+sps_pps_size, 1);
48
-    else {
48
+    } else {
49 49
         (*poutbuf+offset+sps_pps_size)[0] = (*poutbuf+offset+sps_pps_size)[1] = 0;
50 50
         (*poutbuf+offset+sps_pps_size)[2] = 1;
51 51
     }
... ...
@@ -127,11 +127,11 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
127 127
         if (buf + ctx->length_size > buf_end)
128 128
             goto fail;
129 129
 
130
-        if (ctx->length_size == 1)
130
+        if (ctx->length_size == 1) {
131 131
             nal_size = buf[0];
132
-        else if (ctx->length_size == 2)
132
+        } else if (ctx->length_size == 2) {
133 133
             nal_size = AV_RB16(buf);
134
-        else
134
+        } else
135 135
             nal_size = AV_RB32(buf);
136 136
 
137 137
         buf += ctx->length_size;
... ...
@@ -147,8 +147,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
147 147
                                buf, nal_size) < 0)
148 148
                 goto fail;
149 149
             ctx->first_idr = 0;
150
-        }
151
-        else {
150
+        } else {
152 151
             if (alloc_and_copy(poutbuf, poutbuf_size,
153 152
                            NULL, 0,
154 153
                                buf, nal_size) < 0)