[x265] fix: Bus error

Satoshi Nakagawa nakagawa424 at oki.com
Wed Jun 4 09:41:34 CEST 2014



> -----Original Message-----
> From: x265-devel [mailto:x265-devel-bounces at videolan.org] On Behalf Of
> Steve Borho
> Sent: Wednesday, June 04, 2014 2:44 PM
> To: Development for x265
> Subject: Re: [x265] fix: Bus error
> 
> On Wed, Jun 4, 2014 at 12:32 AM, Satoshi Nakagawa <nakagawa424 at oki.com>
> wrote:
> >
> > Please discard previous patch, sorry.
> >
> >
> > # HG changeset patch
> > # User Satoshi Nakagawa <nakagawa424 at oki.com> # Date 1401859829 -32400
> > #      Wed Jun 04 14:30:29 2014 +0900
> > # Node ID 3ae987980ba4e72b57a57e957cb2a6b455c9b737
> > # Parent  f2479eb454b0ef50e50a7df5ab877ced2cfe5db6
> > fix: Bus error
> >
> > diff -r f2479eb454b0 -r 3ae987980ba4 source/Lib/TLibCommon/SEI.h
> > --- a/source/Lib/TLibCommon/SEI.h       Tue Jun 03 15:24:22 2014 -0500
> > +++ b/source/Lib/TLibCommon/SEI.h       Wed Jun 04 14:30:29 2014 +0900
> > @@ -185,7 +185,10 @@
> >
> >      PayloadType payloadType() const { return PICTURE_TIMING; }
> >
> > -    SEIPictureTiming() {}
> > +    SEIPictureTiming()
> > +        : m_numNalusInDuMinus1(0)
> > +        , m_duCpbRemovalDelayMinus1(0)
> > +    {}
> 
> we were trying to get rid of the constructor, since the object is only
> instantiated in one place. Can you move these two assignments to
> frameencoder.cpp?

these variables are not used, not initialized, but destructor calls delete
[].

just fix the bus error.




> 
> >
> >      virtual ~SEIPictureTiming()
> >      {
> > diff -r f2479eb454b0 -r 3ae987980ba4
> source/Lib/TLibEncoder/NALwrite.cpp
> > --- a/source/Lib/TLibEncoder/NALwrite.cpp       Tue Jun 03 15:24:22
> 2014 -0500
> > +++ b/source/Lib/TLibEncoder/NALwrite.cpp       Wed Jun 04 14:30:29
> 2014 +0900
> > @@ -108,7 +108,7 @@
> >          }
> >
> >          uint32_t i = packetSize;
> > -        out = (uint8_t*)realloc(out, nalsize + 4);
> > +        out = (uint8_t*)realloc(out, packetSize + nalsize + 4);
> >          memcpy(out + packetSize, emulation, nalsize);
> >          packetSize += nalsize;
> >
> > diff -r f2479eb454b0 -r 3ae987980ba4 source/encoder/encoder.cpp
> > --- a/source/encoder/encoder.cpp        Tue Jun 03 15:24:22 2014 -0500
> > +++ b/source/encoder/encoder.cpp        Wed Jun 04 14:30:29 2014 +0900
> > @@ -174,6 +174,7 @@
> >
> >  void Encoder::init()
> >  {
> > +    m_totalFrameThreads = param->frameNumThreads;
> >      if (m_frameEncoder)
> >      {
> >          int numRows = (param->sourceHeight + g_maxCUSize - 1) /
> > g_maxCUSize; @@ -189,7 +190,6 @@
> >      m_rateControl->init(&m_frameEncoder[0].m_sps);
> >      m_lookahead->init();
> >      m_encodeStartTime = x265_mdate();
> > -    m_totalFrameThreads = param->frameNumThreads;
> >  }
> 
> These last two belong on stable.  Can you split these into a separate
> patch?
> 
> Thanks
> 
> --
> Steve
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel



More information about the x265-devel mailing list