[FFmpeg-devel] [PATCH 1/5] Make configure_filters() return a meaningful error code rather than always -1.

Stefano Sabatini stefano.sabatini-lala
Tue Aug 24 17:49:46 CEST 2010


On date Friday 2010-08-13 16:25:00 +0200, Stefano Sabatini encoded:
> On date Monday 2010-07-26 13:34:44 +0200, Michael Niedermayer encoded:
> > On Sun, Jul 25, 2010 at 12:43:49PM +0200, Stefano Sabatini wrote:
> > > ---
> > >  ffmpeg.c |   53 +++++++++++++++++++++++++++--------------------------
> > >  1 files changed, 27 insertions(+), 26 deletions(-)
> > > 
> > > diff --git a/ffmpeg.c b/ffmpeg.c
> > > index 9c03548..7cbea18 100644
> > > --- a/ffmpeg.c
> > > +++ b/ffmpeg.c
> > > @@ -406,20 +406,21 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
> > >      AVCodecContext *codec = ost->st->codec;
> > >      AVCodecContext *icodec = ist->st->codec;
> > >      char args[255];
> > > +    int ret;
> > >  
> > >      graph = av_mallocz(sizeof(AVFilterGraph));
> > >  
> > >      if (!(ist->input_video_filter = avfilter_open(avfilter_get_by_name("buffer"), "src")))
> > > -        return -1;
> > > +        return AVERROR(EINVAL);
> > >      if (!(ist->out_video_filter = avfilter_open(&output_filter, "out")))
> > > -        return -1;
> > > +        return AVERROR(EINVAL);
> > 
> > a EINVAL for these is not a EINVAL for configure_filters()
> > also they surely can have a ENOMEM as well
> 
> Updated.

Trivial -> applied.
-- 
FFmpeg = Frightening & Faithful Mega Patchable Erotic Goblin



More information about the ffmpeg-devel mailing list