[FFmpeg-devel] [PATCH] libopenjpegenc: recreate image data buffer after encoding frame

2016-10-11 Thread Andreas Cadhalpun
openjpeg 2 sets the data pointers of the image components to NULL, causing segfaults if the image is reused. Signed-off-by: Andreas Cadhalpun --- The relevant openjpeg2 code is: https://sources.debian.net/src/openjpeg2/2.1.2-1/src/lib/openjp2/j2k.c/?hl=10253#L10247 --- libavcodec/libopenjpegen

Re: [FFmpeg-devel] [PATCH] libopenjpegenc: recreate image data buffer after encoding frame

2016-10-11 Thread Michael Bradshaw
On Tue, Oct 11, 2016 at 9:57 AM, Andreas Cadhalpun < andreas.cadhal...@googlemail.com> wrote: > openjpeg 2 sets the data pointers of the image components to NULL, > causing segfaults if the image is reused. > I've never seen this issue. Is there a particular version of OpenJPEG or reproduction st

Re: [FFmpeg-devel] [PATCH] libopenjpegenc: recreate image data buffer after encoding frame

2016-10-12 Thread Andreas Cadhalpun
On 12.10.2016 03:42, Michael Bradshaw wrote: > On Tue, Oct 11, 2016 at 9:57 AM, Andreas Cadhalpun < > andreas.cadhal...@googlemail.com> wrote: > >> openjpeg 2 sets the data pointers of the image components to NULL, >> causing segfaults if the image is reused. >> > > I've never seen this issue. T

Re: [FFmpeg-devel] [PATCH] libopenjpegenc: recreate image data buffer after encoding frame

2016-10-12 Thread Michael Bradshaw
On Wed, Oct 12, 2016 at 8:45 AM, Andreas Cadhalpun < andreas.cadhal...@googlemail.com> wrote: > On 12.10.2016 03:42, Michael Bradshaw wrote: > > On Tue, Oct 11, 2016 at 9:57 AM, Andreas Cadhalpun < > > andreas.cadhal...@googlemail.com> wrote: > > > >> openjpeg 2 sets the data pointers of the image

Re: [FFmpeg-devel] [PATCH] libopenjpegenc: recreate image data buffer after encoding frame

2016-10-13 Thread Andreas Cadhalpun
On 13.10.2016 03:36, Michael Bradshaw wrote: > Thanks for that (and the link back to the OpenJPEG source). Well dang. I > think it would be better to change the patch to completely remove the image > member from LibOpenJPEGContext, and instead just create a local image (and > destroy it) for every

Re: [FFmpeg-devel] [PATCH] libopenjpegenc: recreate image data buffer after encoding frame

2016-10-13 Thread Michael Bradshaw
On Thu, Oct 13, 2016 at 12:21 PM, Andreas Cadhalpun < andreas.cadhal...@googlemail.com> wrote: > > OK. Attached patch does that for openjpeg 2. > I didn't change the behavior for openjpeg 1, as reusing the image works > there. Looks good to me. Thanks! Please feel free to apply it. __

Re: [FFmpeg-devel] [PATCH] libopenjpegenc: recreate image data buffer after encoding frame

2016-10-14 Thread Andreas Cadhalpun
On 14.10.2016 06:07, Michael Bradshaw wrote: > On Thu, Oct 13, 2016 at 12:21 PM, Andreas Cadhalpun < > andreas.cadhal...@googlemail.com> wrote: >> >> OK. Attached patch does that for openjpeg 2. >> I didn't change the behavior for openjpeg 1, as reusing the image works >> there. > > > Looks good