1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-25 04:38:01 +00:00

Small code simplification as suggested by Reimar:

declare variables used only inside loop in those loop.
Hope this will make code a bit easy to understand.




git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24300 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
voroshil 2007-08-29 18:19:50 +00:00
parent 9ef594f0e8
commit b60132ee12

View File

@ -566,28 +566,20 @@ static void destroy_cache(priv_vbi_t* priv){
*/ */
static void decode_page(tt_char* p,int lang,unsigned char* raw) static void decode_page(tt_char* p,int lang,unsigned char* raw)
{ {
int c,gfx=0,lat=0;
int i=0;
int fg_color=0;
int bg_color=0;
int row,col; int row,col;
int separated=0;
int conceal;
int hold;
tt_char tt_held;
for(row=0;row<VBI_ROWS;row++) { for(row=0;row<VBI_ROWS;row++) {
lat=(lang==0); int lat=(lang==0);
gfx=0; int gfx=0;
fg_color=7; int fg_color=7;
bg_color=0; int bg_color=0;
separated=0; int separated=0;
conceal=0; int conceal=0;
hold=0; int hold=0;
tt_held=tt_space; tt_char tt_held=tt_space;
for(col=0;col<VBI_COLUMNS;col++){ for(col=0;col<VBI_COLUMNS;col++){
i=row*VBI_COLUMNS+col; int i=row*VBI_COLUMNS+col;
c=raw[i]; int c=raw[i];
p[i].raw=c; p[i].raw=c;
if(c&0x80){ //damaged char if(c&0x80){ //damaged char
p[i]=tt_error; p[i]=tt_error;