Merge commit 'fcae3ff124ee97c9265e3b93f3d41238b2aee9bd'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Jul 2013 09:45:48 +0000 (11:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Jul 2013 09:45:48 +0000 (11:45 +0200)
* commit 'fcae3ff124ee97c9265e3b93f3d41238b2aee9bd':
  dsicinav: K&R formatting cosmetics

Conflicts:
libavcodec/dsicinav.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/dsicinav.c

@@@ -198,13 -185,14 +204,14 @@@ static int cin_decode_lzss(const unsign
      return 0;
  }
  
- static int cin_decode_rle(const unsigned char *src, int src_size, unsigned char *dst, int dst_size)
 -static void cin_decode_rle(const unsigned char *src, int src_size,
++static int cin_decode_rle(const unsigned char *src, int src_size,
+                            unsigned char *dst, int dst_size)
  {
      int len, code;
-     unsigned char *dst_end = dst + dst_size;
+     unsigned char *dst_end       = dst + dst_size;
      const unsigned char *src_end = src + src_size;
  
 -    while (src < src_end && dst < dst_end) {
 +    while (src + 1 < src_end && dst < dst_end) {
          code = *src++;
          if (code & 0x80) {
              len = code - 0x7F;
@@@ -246,14 -230,14 +254,14 @@@ static int cinvideo_decode_frame(AVCode
          if (palette_colors_count > 256)
              return AVERROR_INVALIDDATA;
          for (i = 0; i < palette_colors_count; ++i) {
-             cin->palette[i] = 0xFFU << 24 | bytestream_get_le24(&buf);
 -            cin->palette[i]    = bytestream_get_le24(&buf);
++            cin->palette[i]    = 0xFFU << 24 | bytestream_get_le24(&buf);
              bitmap_frame_size -= 3;
          }
      } else {
          for (i = 0; i < palette_colors_count; ++i) {
-             cin->palette[buf[0]] = 0xFFU << 24 | AV_RL24(buf+1);
-             buf += 4;
-             bitmap_frame_size -= 4;
 -            cin->palette[buf[0]] = AV_RL24(buf + 1);
++            cin->palette[buf[0]] = 0xFFU << 24 | AV_RL24(buf + 1);
+             buf                 += 4;
+             bitmap_frame_size   -= 4;
          }
      }
  
          break;
      case 34:
          cin_decode_rle(buf, bitmap_frame_size,
-           cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
+                        cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
          cin_apply_delta_data(cin->bitmap_table[CIN_PRE_BMP],
-           cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
+                              cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
          break;
      case 35:
 -        cin_decode_huffman(buf, bitmap_frame_size,
 +        bitmap_frame_size = cin_decode_huffman(buf, bitmap_frame_size,
-           cin->bitmap_table[CIN_INT_BMP], cin->bitmap_size);
+                            cin->bitmap_table[CIN_INT_BMP], cin->bitmap_size);
          cin_decode_rle(cin->bitmap_table[CIN_INT_BMP], bitmap_frame_size,
-           cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
+                        cin->bitmap_table[CIN_CUR_BMP], cin->bitmap_size);
          break;
      case 36:
          bitmap_frame_size = cin_decode_huffman(buf, bitmap_frame_size,