[x265] [PATCH 3 of 5] TEncTop: remove debugging exit() call

Steve Borho steve at borho.org
Wed Sep 18 21:51:43 CEST 2013


On Wed, Sep 18, 2013 at 2:36 PM, Rafaël Carré <funman at videolan.org> wrote:

> Le 18/09/2013 20:52, Steve Borho a écrit :
> > # HG changeset patch
> > # User Steve Borho <steve at borho.org>
> > # Date 1379525671 18000
> > #      Wed Sep 18 12:34:31 2013 -0500
> > # Node ID 165ef70557b68f44311bf689c825a4d2302de25a
> > # Parent  0b1216d453cfb3660fb62d4dfedb9613158974ed
> > TEncTop: remove debugging exit() call
> >
> > diff -r 0b1216d453cf -r 165ef70557b6 source/Lib/TLibEncoder/TEncTop.cpp
> > --- a/source/Lib/TLibEncoder/TEncTop.cpp      Wed Sep 18 12:23:52 2013
> -0500
> > +++ b/source/Lib/TLibEncoder/TEncTop.cpp      Wed Sep 18 12:34:31 2013
> -0500
> > @@ -87,10 +87,8 @@
> >  {
> >      if (!primitives.sad[0])
> >      {
> > -        printf("Primitives must be initialized before encoder is
> created\n");
> > -        // we call exit() here because this should be an impossible
> condition when
> > -        // using our public API, and indicates a serious bug.
> > -        exit(1);
> > +        // this should be an impossible condition when using our public
> API, and indicates a serious bug.
> > +        x265_log(&param, X265_LOG_ERROR, "Primitives must be
> initialized before encoder is created\n");
>
> What about:
> assert(primitives.sad[0] && "Primitives must be initialized before
> encoder is created");
>
> ?
>
> It will print the message if the assert is triggered (and crash, which
> indicates a "serious bug" :)
>
>
I want it to complain loudly in release mode as well.  An assert would be
good though, will resend.


> >      }
> >
> >      m_frameEncoder = new FrameEncoder[param.frameNumThreads];
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>



-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20130918/94224a29/attachment.html>


More information about the x265-devel mailing list