[FFmpeg-devel] [PATCH] Make avfilter_formats_unref() handle the case where *ref is NULL
Michael Niedermayer
michaelni
Thu Jan 7 21:31:15 CET 2010
On Thu, Jan 07, 2010 at 12:37:08AM +0100, Stefano Sabatini wrote:
> On date Thursday 2010-01-07 00:14:54 +0100, Michael Niedermayer encoded:
> > On Wed, Jan 06, 2010 at 11:33:38PM +0100, Stefano Sabatini wrote:
> [...]
> > > +fail:
> > > + if (formats)
> > > + avfilter_formats_unref(&formats);
> >
> > do we need the if() ?
> > in general functions not needing explicit NULL checks are nicer IMHO
>
> Do you mean like this?
> --
> FFmpeg = Friendly Faboulous Mean Ponderous Extreme Guru
> avfilter.h | 5 +++--
> formats.c | 3 +++
> 2 files changed, 6 insertions(+), 2 deletions(-)
> c818d6d31da2124f8c416f0300fab638b0dd154d make-avff-unref-manage-null.patch
ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100107/c464bd44/attachment.pgp>
More information about the ffmpeg-devel
mailing list