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

Michael Niedermayer michaelni
Mon Jul 26 13:34:44 CEST 2010


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

[...]

-- 
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: 190 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100726/f054dd35/attachment.pgp>



More information about the ffmpeg-devel mailing list