diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-11-02 01:19:03 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-11-02 01:19:03 +0000 |
commit | 94ee6c100dea2f66088f92cae4e16676197e0151 (patch) | |
tree | 010fecb82ec0bc3773415565a115b562abe1fcb4 /libavcodec/msrledec.c | |
parent | 0422af7e49dbd3ac1d552edcd7972e266e0202a4 (diff) | |
download | ffmpeg-94ee6c100dea2f66088f92cae4e16676197e0151.tar.gz |
fix indent
Originally committed as revision 25630 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/msrledec.c')
-rw-r--r-- | libavcodec/msrledec.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/libavcodec/msrledec.c b/libavcodec/msrledec.c index 6e16d535b3..2f27d20371 100644 --- a/libavcodec/msrledec.c +++ b/libavcodec/msrledec.c @@ -70,34 +70,34 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, pixel_ptr += stream_byte; FETCH_NEXT_STREAM_BYTE(); row_ptr -= stream_byte * row_dec; - } else { - // copy pixels from encoded stream - odd_pixel = stream_byte & 1; - rle_code = (stream_byte + 1) / 2; - extra_byte = rle_code & 0x01; - if ((row_ptr + pixel_ptr + stream_byte > frame_size) || - (row_ptr < 0)) { - av_log(avctx, AV_LOG_ERROR, " MS RLE: frame ptr just went out of bounds (1)\n"); - return -1; - } + } else { + // copy pixels from encoded stream + odd_pixel = stream_byte & 1; + rle_code = (stream_byte + 1) / 2; + extra_byte = rle_code & 0x01; + if ((row_ptr + pixel_ptr + stream_byte > frame_size) || + (row_ptr < 0)) { + av_log(avctx, AV_LOG_ERROR, " MS RLE: frame ptr just went out of bounds (1)\n"); + return -1; + } - for (i = 0; i < rle_code; i++) { - if (pixel_ptr >= avctx->width) - break; - FETCH_NEXT_STREAM_BYTE(); - pic->data[0][row_ptr + pixel_ptr] = stream_byte >> 4; - pixel_ptr++; - if (i + 1 == rle_code && odd_pixel) - break; - if (pixel_ptr >= avctx->width) - break; - pic->data[0][row_ptr + pixel_ptr] = stream_byte & 0x0F; - pixel_ptr++; - } + for (i = 0; i < rle_code; i++) { + if (pixel_ptr >= avctx->width) + break; + FETCH_NEXT_STREAM_BYTE(); + pic->data[0][row_ptr + pixel_ptr] = stream_byte >> 4; + pixel_ptr++; + if (i + 1 == rle_code && odd_pixel) + break; + if (pixel_ptr >= avctx->width) + break; + pic->data[0][row_ptr + pixel_ptr] = stream_byte & 0x0F; + pixel_ptr++; + } - // if the RLE code is odd, skip a byte in the stream - if (extra_byte) - stream_ptr++; + // if the RLE code is odd, skip a byte in the stream + if (extra_byte) + stream_ptr++; } } else { // decode a run of data |