[mythtv] Re: [mythtv-commits] mythtv commits

Isaac Richards ijr at po.cwru.edu
Sat Nov 27 20:49:26 UTC 2004


On Saturday 27 November 2004 03:21 pm, Kenneth Aafl°y wrote:
> On Saturday 27 November 2004 21:03, Isaac Richards wrote:
> > On Saturday 27 November 2004 02:47 pm, Kenneth Aafl°y wrote:
> > > On Saturday 27 November 2004 20:40, mythtv at cvs.mythtv.org wrote:
> > > > ---------------------------------------------------------------------
> > > >-- -- -- - Changes committed by ijr on Sat Nov 27 19:35:39 2004
> > > >
> > > > Modified Files:
> > > >    in mythtv/libs/libmythtv:
> > > >         avformatdecoder.cpp
> > > > Log Message:
> > > > Check for avcodec passing in an invalid pointer.
> > >
> > > Should not this have been an assert?
> >
> > How is exiting due to the assert being hit any different than
> > segfaulting?
>
> An assert is a condition that the codepath below does not account for, a
> segfault is a condition that might have been caused by another codepath.

And what exactly is the difference to the end user?  The program would still 
exit with an assert there.  It doesn't matter to them if it's due to an 
assert or due to a segfault, all they know is that it's not running anymore.

> When was ignoring the error of a null pointer from a underlying library
> (which might have been caused by the user of the library) become a good
> thing to do?

When using an assert causes the program to exit, and handling the null value 
will quite possibly work around this?

Isaac


More information about the mythtv-dev mailing list