summaryrefslogtreecommitdiff
path: root/libavformat/bethsoftvid.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-04-07 23:26:11 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-04-07 23:26:11 +0000
commitf858c24fb3f819e512c80fc69baf6dee80eb2398 (patch)
tree8a022b97b9705c39ef78dcaddf1551788dcc2243 /libavformat/bethsoftvid.c
parenta7c405a48ae4577f37da3574610d859d2b1775b8 (diff)
downloadffmpeg-f858c24fb3f819e512c80fc69baf6dee80eb2398.tar.gz
simplify
Originally committed as revision 8669 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/bethsoftvid.c')
-rw-r--r--libavformat/bethsoftvid.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index 97439e827f..0b50471fd6 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -136,13 +136,12 @@ static int read_frame(BVID_DemuxContext *vid, ByteIOContext *pb, AVPacket *pkt,
if(rle_num_bytes >= 0x80){ // rle sequence
if(block_type == VIDEO_I_FRAME)
vidbuf_start[vidbuf_nbytes++] = get_byte(pb);
- bytes_copied += rle_num_bytes - 0x80;
} else if(rle_num_bytes){ // plain sequence
if(get_buffer(pb, &vidbuf_start[vidbuf_nbytes], rle_num_bytes) != rle_num_bytes)
goto fail;
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
// may contain a 0 byte even if read all pixels
if(get_byte(pb))