[FFmpeg-devel] [PATCH 5/6] Make avcodec_check_dimensions() return AVERROR(EINVAL) rather than -1 in case of invalid picture size.

Michael Niedermayer michaelni
Sat Apr 24 23:56:20 CEST 2010


On Sat, Apr 24, 2010 at 08:53:24PM +0200, Stefano Sabatini wrote:
> ---
>  libavcodec/utils.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
> index 34e8ae4..87facec 100644
> --- a/libavcodec/utils.c
> +++ b/libavcodec/utils.c
> @@ -224,7 +224,7 @@ int avcodec_check_dimensions(void *av_log_ctx, unsigned int w, unsigned int h){
>          return 0;
>  
>      av_log(av_log_ctx, AV_LOG_ERROR, "picture size invalid (%ux%u)\n", w, h);
> -    return -1;
> +    return AVERROR(EINVAL);

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100424/8defd979/attachment.pgp>



More information about the ffmpeg-devel mailing list