On date Sunday 2015-03-15 14:24:29 +0100, Clément Bœsch encoded: > --- > libavfilter/formats.c | 45 ++++++++++++++++++++++++++++++++------------- > libavfilter/formats.h | 10 +++++----- > 2 files changed, 37 insertions(+), 18 deletions(-) > > diff --git a/libavfilter/formats.c b/libavfilter/formats.c > index 6393416..4f9773b 100644 > --- a/libavfilter/formats.c > +++ b/libavfilter/formats.c > @@ -401,7 +401,12 @@ AVFilterChannelLayouts *ff_all_channel_counts(void) > } > > #define FORMATS_REF(f, ref) > \ > - void *tmp = av_realloc_array(f->refs, sizeof(*f->refs), f->refcount + > 1); \ > + void *tmp; > \ > + > \ > + if (!ref) > \ > + return AVERROR_BUG; > \
I'd prefer to crash or assert here, assuming the function doesn't assume NULL, same below. (Unrelated note: "bug" is a silly term, "defect" is more proper - I'm with Dijkstra here). [...] LGTM otherwise, thanks. -- FFmpeg = Fierce Fiendish Magnificient Philosophical Erudite Game _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel