On Thu, Oct 16, 2014 at 4:04 PM, j-b-m <j-...@users.sourceforge.net> wrote: > > On Wednesday 15 October 2014 23.21:53 GitHub wrote: > > Branch: refs/heads/master > > Home: https://github.com/mltframework/mlt > > Commit: 0036f0d3ef40230cbe4a9e4970383b0a67e70873 > > > > https://github.com/mltframework/mlt/commit/0036f0d3ef40230cbe4a9e4970383b0a > > 67e70873 Author: Dan Dennedy <d...@dennedy.org> > > Date: 2014-10-15 (Wed, 15 Oct 2014) > > > > Changed paths: > > M src/modules/sdl/consumer_sdl.c > > Hi all, > > The last part of this change: > > + int size = mlt_image_format_size( vfmt, > width, height, NULL ); > if ( image != NULL ) > - memcpy( self->buffer, image, width * > height * 2 ); > + memcpy( self->buffer, image, size ); > > crashes Kdenlive with a memcopy error. > Previously the image size was calculated like this: > > memcpy( self->buffer, image, width * height * 2 ); > > Now that we use mlt_image_format, the size is different because in > mlt_image_format_size (mlt_frame.c), we have this: > (..) > height += 1; > (..) > return width * height * 2;
I have never been very happy with this height + 1 kludge. Do you recall anything about why that was done? I vaguely recall it was to safely allow some image processing routines to read beyond the end of a buffer, perhaps for interpolation. I would have to do a lot of searching old commit messages and e-mails to be diligent about understanding it. I am inclined to remove that nonsense and do some testing and subsequent bug fixing where needed. In the short term, we can pass height - 1 on that call in consumer_sdl.c. -- +-DRD-+ ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel