- while(length > line_remaining)
- {
- if(rle_num_bytes < 0x80) { bytestream_get_buffer(&buf, destination, line_remaining); }
- else if(block_type == VIDEO_I_FRAME) { memset(destination, buf[0], line_remaining); }
- length -= line_remaining; // decrement the number of bytes to be copied
- destination += line_remaining + wrap_to_next_line; // skip over extra bytes at end of frame
- line_remaining = avctx->width;
- if(destination == frame_end) { goto end; }
+ while(length > remaining){
+ if(code < 0x80)
+ bytestream_get_buffer(&buf, dst, remaining);
+ else if(block_type == VIDEO_I_FRAME)
+ memset(dst, buf[0], remaining);
+ length -= remaining; // decrement the number of bytes to be copied
+ dst += remaining + wrap_to_next_line; // skip over extra bytes at end of frame
+ remaining = avctx->width;
+ if(dst == frame_end)
+ goto end;