[FFmpeg-devel] [PATCH] lavu/base64: return meaningful error code.
Stefano Sabatini
stefasab at gmail.com
Tue Jan 1 17:28:23 CET 2013
On date Tuesday 2013-01-01 16:04:34 +0100, Nicolas George encoded:
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> libavutil/base64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavutil/base64.c b/libavutil/base64.c
> index 98b9c94..353490e 100644
> --- a/libavutil/base64.c
> +++ b/libavutil/base64.c
> @@ -125,7 +125,7 @@ out2:
> *dst++ = v >> 4;
> out1:
> out0:
> - return bits & 1 ? -1 : dst - out;
> + return bits & 1 ? AVERROR(EINVAL) : dst - out;
Since this is av_base64_decode() may be that AVERROR_INVALIDDATA suits
the error better.
--
FFmpeg = Fostering and Fancy Marvellous Picky Epic Gangster
More information about the ffmpeg-devel
mailing list