Mercurial > libavformat.hg
comparison bethsoftvid.c @ 1998:a5addcafd161 libavformat
simplify
author | michael |
---|---|
date | Sat, 07 Apr 2007 23:26:11 +0000 |
parents | fde951d80d2b |
children | c97517791e6c |
comparison
equal
deleted
inserted
replaced
1997:fde951d80d2b | 1998:a5addcafd161 |
---|---|
134 vidbuf_start[vidbuf_nbytes++] = rle_num_bytes; | 134 vidbuf_start[vidbuf_nbytes++] = rle_num_bytes; |
135 | 135 |
136 if(rle_num_bytes >= 0x80){ // rle sequence | 136 if(rle_num_bytes >= 0x80){ // rle sequence |
137 if(block_type == VIDEO_I_FRAME) | 137 if(block_type == VIDEO_I_FRAME) |
138 vidbuf_start[vidbuf_nbytes++] = get_byte(pb); | 138 vidbuf_start[vidbuf_nbytes++] = get_byte(pb); |
139 bytes_copied += rle_num_bytes - 0x80; | |
140 } else if(rle_num_bytes){ // plain sequence | 139 } else if(rle_num_bytes){ // plain sequence |
141 if(get_buffer(pb, &vidbuf_start[vidbuf_nbytes], rle_num_bytes) != rle_num_bytes) | 140 if(get_buffer(pb, &vidbuf_start[vidbuf_nbytes], rle_num_bytes) != rle_num_bytes) |
142 goto fail; | 141 goto fail; |
143 vidbuf_nbytes += rle_num_bytes; | 142 vidbuf_nbytes += rle_num_bytes; |
144 bytes_copied += rle_num_bytes; | |
145 } | 143 } |
144 bytes_copied += rle_num_bytes & 0x7F; | |
146 if(bytes_copied == npixels){ // sometimes no stop character is given, need to keep track of bytes copied | 145 if(bytes_copied == npixels){ // sometimes no stop character is given, need to keep track of bytes copied |
147 // may contain a 0 byte even if read all pixels | 146 // may contain a 0 byte even if read all pixels |
148 if(get_byte(pb)) | 147 if(get_byte(pb)) |
149 url_fseek(pb, -1, SEEK_CUR); | 148 url_fseek(pb, -1, SEEK_CUR); |
150 break; | 149 break; |