Commit 63510d4d authored by michael's avatar michael

simplify


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8669 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 6a577c22
...@@ -136,13 +136,12 @@ static int read_frame(BVID_DemuxContext *vid, ByteIOContext *pb, AVPacket *pkt, ...@@ -136,13 +136,12 @@ static int read_frame(BVID_DemuxContext *vid, ByteIOContext *pb, AVPacket *pkt,
if(rle_num_bytes >= 0x80){ // rle sequence if(rle_num_bytes >= 0x80){ // rle sequence
if(block_type == VIDEO_I_FRAME) if(block_type == VIDEO_I_FRAME)
vidbuf_start[vidbuf_nbytes++] = get_byte(pb); vidbuf_start[vidbuf_nbytes++] = get_byte(pb);
bytes_copied += rle_num_bytes - 0x80;
} else if(rle_num_bytes){ // plain sequence } else if(rle_num_bytes){ // plain sequence
if(get_buffer(pb, &vidbuf_start[vidbuf_nbytes], rle_num_bytes) != rle_num_bytes) if(get_buffer(pb, &vidbuf_start[vidbuf_nbytes], rle_num_bytes) != rle_num_bytes)
goto fail; goto fail;
vidbuf_nbytes += rle_num_bytes; vidbuf_nbytes += rle_num_bytes;
bytes_copied += rle_num_bytes;
} }
bytes_copied += rle_num_bytes & 0x7F;
if(bytes_copied == npixels){ // sometimes no stop character is given, need to keep track of bytes copied 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 // may contain a 0 byte even if read all pixels
if(get_byte(pb)) if(get_byte(pb))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment