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

Stefano Sabatini stefano.sabatini-lala
Fri Aug 13 16:25:00 CEST 2010


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.
-- 
FFmpeg = Fabulous Fundamental Marvellous Portentous Emblematic Gangster



More information about the ffmpeg-devel mailing list