Merge branch '2.4' into master

Commits:
67fe57a add fixed video
db0ae2c Restore 2.4 source branch for bug fix 6317.
97ac59c Fix a memory leak indirectly caused by cvDestroyWindow
eb40afa Add a workaround for FFmpeg's color conversion accessing past the end of the buffer
421fcf9 Rearrange CvVideoWriter_FFMPEG::writeFrame for better readability
912592d Remove "INSTALL_NAME_DIR lib" target property
bb1c2d7 fix bug on border at pyrUp
This commit is contained in:
Alexander Alekhin
2016-04-21 20:10:51 +03:00
10 changed files with 86 additions and 75 deletions

View File

@@ -228,8 +228,6 @@ bool PngDecoder::readData( Mat& img )
AutoBuffer<uchar*> _buffer(m_height);
uchar** buffer = _buffer;
int color = img.channels() > 1;
uchar* data = img.ptr();
int step = (int)img.step;
if( m_png_ptr && m_info_ptr && m_end_info && m_width && m_height )
{
@@ -281,7 +279,7 @@ bool PngDecoder::readData( Mat& img )
png_read_update_info( png_ptr, info_ptr );
for( y = 0; y < m_height; y++ )
buffer[y] = data + y*step;
buffer[y] = img.data + y*img.step;
png_read_image( png_ptr, buffer );
png_read_end( png_ptr, end_info );