Commit bda90dae authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #14200 from alalek:fix_imgcodecs_stream_set_pos

parents 68946510 6dfb6a30
...@@ -175,8 +175,11 @@ void RBaseStream::setPos( int pos ) ...@@ -175,8 +175,11 @@ void RBaseStream::setPos( int pos )
} }
int offset = pos % m_block_size; int offset = pos % m_block_size;
int old_block_pos = m_block_pos;
m_block_pos = pos - offset; m_block_pos = pos - offset;
m_current = m_start + offset; m_current = m_start + offset;
if (old_block_pos != m_block_pos)
readBlock();
} }
......
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