Mercurial > libavformat.hg
changeset 1999:c97517791e6c libavformat
s/rle_num_bytes/code/
shorter and correcter (its not the number of anything)
author | michael |
---|---|
date | Sat, 07 Apr 2007 23:32:55 +0000 |
parents | a5addcafd161 |
children | ce51095f383b |
files | bethsoftvid.c |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/bethsoftvid.c Sat Apr 07 23:26:11 2007 +0000 +++ b/bethsoftvid.c Sat Apr 07 23:32:55 2007 +0000 @@ -101,7 +101,7 @@ { uint8_t * vidbuf_start = NULL; int vidbuf_nbytes = 0; - int rle_num_bytes; + int code; int bytes_copied = 0; int position; size_t vidbuf_capacity; @@ -130,18 +130,18 @@ if(!vidbuf_start) return AVERROR_NOMEM; - rle_num_bytes = get_byte(pb); - vidbuf_start[vidbuf_nbytes++] = rle_num_bytes; + code = get_byte(pb); + vidbuf_start[vidbuf_nbytes++] = code; - if(rle_num_bytes >= 0x80){ // rle sequence + if(code >= 0x80){ // rle sequence if(block_type == VIDEO_I_FRAME) vidbuf_start[vidbuf_nbytes++] = get_byte(pb); - } else if(rle_num_bytes){ // plain sequence - if(get_buffer(pb, &vidbuf_start[vidbuf_nbytes], rle_num_bytes) != rle_num_bytes) + } else if(code){ // plain sequence + if(get_buffer(pb, &vidbuf_start[vidbuf_nbytes], code) != code) goto fail; - vidbuf_nbytes += rle_num_bytes; + vidbuf_nbytes += code; } - bytes_copied += rle_num_bytes & 0x7F; + bytes_copied += code & 0x7F; if(bytes_copied == npixels){ // sometimes no stop character is given, need to keep track of bytes copied // may contain a 0 byte even if read all pixels if(get_byte(pb)) @@ -150,7 +150,7 @@ } if(bytes_copied > npixels) goto fail; - } while(rle_num_bytes); + } while(code); // copy data into packet if(av_new_packet(pkt, vidbuf_nbytes) < 0)