[FFmpeg-devel] [RFC] libavfilter query_format() related functions error handling

Michael Niedermayer michaelni at gmx.at
Sat Mar 14 15:25:19 CET 2015

On Sat, Mar 14, 2015 at 03:11:28PM +0100, Clément Bœsch wrote:
> On Sat, Mar 14, 2015 at 01:33:12PM +0100, Nicolas George wrote:
> > Le quartidi 24 ventôse, an CCXXIII, Michael Niedermayer a écrit :
> > >     ff_set_common_channel_layouts(ctx, ff_all_channel_layouts());
> > >     ff_set_common_formats(ctx, ff_make_format_list(sample_fmts));
> > >     ff_set_common_samplerates(ctx, ff_all_samplerates());
> > > 
> What do you do about the 2nd argument being NULL by allocation error here?
> Should the ctx passed there too?

there are many possibilities like returning a specific pointer to a
struct indicating errors but passing ret may be more intuitive


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150314/a7f37394/attachment.asc>

More information about the ffmpeg-devel mailing list