1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

cosmetics: K&R coding style, prettyprinting

Originally committed as revision 20115 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Diego Biurrun 2009-10-01 09:11:07 +00:00
parent a8b95021e5
commit 37a4269d70

View File

@ -31,7 +31,8 @@ typedef struct SgiContext {
AVFrame picture;
} SgiContext;
static av_cold int encode_init(AVCodecContext *avctx){
static av_cold int encode_init(AVCodecContext *avctx)
{
SgiContext *s = avctx->priv_data;
avcodec_get_frame_defaults(&s->picture);
@ -41,7 +42,8 @@ static av_cold int encode_init(AVCodecContext *avctx){
}
static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
int buf_size, void *data) {
int buf_size, void *data)
{
SgiContext *s = avctx->priv_data;
AVFrame * const p = &s->picture;
uint8_t *offsettab, *lengthtab, *in_buf, *encode_buf;
@ -127,7 +129,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
for (x = 0; x < width; x++)
encode_buf[x] = in_buf[depth * x];
if((length = ff_rle_encode(buf, end_buf - buf - 1, encode_buf, 1, width, 0, 0, 0x80, 0)) < 1) {
if ((length = ff_rle_encode(buf, end_buf - buf - 1, encode_buf, 1, width, 0, 0, 0x80, 0)) < 1) {
av_free(encode_buf);
return -1;
}
@ -168,4 +170,3 @@ AVCodec sgi_encoder = {
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGBA, PIX_FMT_GRAY8, PIX_FMT_NONE},
.long_name= NULL_IF_CONFIG_SMALL("SGI image"),
};