1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-07-06 06:27:36 +02:00

libavcodec/ccaption_dec: clean up and standardize white space

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Aman Gupta
2016-01-04 19:28:02 -08:00
committed by Michael Niedermayer
parent 23679d82f6
commit 55ca79f526

View File

@ -148,7 +148,6 @@ struct Screen {
int16_t row_used; int16_t row_used;
}; };
typedef struct CCaptionSubContext { typedef struct CCaptionSubContext {
AVClass *class; AVClass *class;
struct Screen screen[2]; struct Screen screen[2];
@ -258,9 +257,7 @@ static int validate_cc_data_pair (uint8_t *cc_data_pair)
cc_data_pair[1] &= 0x7F; cc_data_pair[1] &= 0x7F;
cc_data_pair[2] &= 0x7F; cc_data_pair[2] &= 0x7F;
return 0; return 0;
} }
static struct Screen *get_writing_screen(CCaptionSubContext *ctx) static struct Screen *get_writing_screen(CCaptionSubContext *ctx)
@ -311,7 +308,6 @@ static void roll_up(CCaptionSubContext *ctx)
} }
UNSET_FLAG(screen->row_used, ctx->cursor_row); UNSET_FLAG(screen->row_used, ctx->cursor_row);
} }
static int reap_screen(CCaptionSubContext *ctx, int64_t pts) static int reap_screen(CCaptionSubContext *ctx, int64_t pts)
@ -394,7 +390,6 @@ static void handle_pac( CCaptionSubContext *ctx, uint8_t hi, uint8_t lo )
if (ret == 0) if (ret == 0)
ctx->cursor_column++; ctx->cursor_column++;
} }
} }
/** /**
@ -425,7 +420,6 @@ static void handle_delete_end_of_row( CCaptionSubContext *ctx, char hi, char lo)
struct Screen *screen = get_writing_screen(ctx); struct Screen *screen = get_writing_screen(ctx);
char *row = screen->characters[ctx->cursor_row]; char *row = screen->characters[ctx->cursor_row];
write_char(ctx, row, ctx->cursor_column, 0); write_char(ctx, row, ctx->cursor_column, 0);
} }
static void handle_char(CCaptionSubContext *ctx, char hi, char lo, int64_t pts) static void handle_char(CCaptionSubContext *ctx, char hi, char lo, int64_t pts)
@ -516,7 +510,6 @@ static int process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint8
#undef COR3 #undef COR3
return ret; return ret;
} }
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt) static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
@ -539,7 +532,6 @@ static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avp
memcpy(ctx->pktbuf->data, avpkt->data, len); memcpy(ctx->pktbuf->data, avpkt->data, len);
bptr = ctx->pktbuf->data; bptr = ctx->pktbuf->data;
for (i = 0; i < len; i += 3) { for (i = 0; i < len; i += 3) {
uint8_t cc_type = *(bptr + i) & 3; uint8_t cc_type = *(bptr + i) & 3;
if (validate_cc_data_pair(bptr + i)) if (validate_cc_data_pair(bptr + i))