mirror of
https://github.com/opencv/opencv.git
synced 2025-01-19 06:53:50 +08:00
Merge pull request #14200 from alalek:fix_imgcodecs_stream_set_pos
This commit is contained in:
commit
bda90dae77
@ -175,8 +175,11 @@ void RBaseStream::setPos( int pos )
|
||||
}
|
||||
|
||||
int offset = pos % m_block_size;
|
||||
int old_block_pos = m_block_pos;
|
||||
m_block_pos = pos - offset;
|
||||
m_current = m_start + offset;
|
||||
if (old_block_pos != m_block_pos)
|
||||
readBlock();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user