[FFmpeg-devel] [PATCH 5/6] avutil/rc4: use EINVAL instead of -1 for the return code of av_rc4_init()

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sun Oct 18 21:23:38 CEST 2015


On Sat, Oct 17, 2015 at 7:39 PM, Ganesh Ajjanagadde
<gajjanagadde at gmail.com> wrote:
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
>  libavutil/rc4.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavutil/rc4.c b/libavutil/rc4.c
> index 6bd702c..ffcb112 100644
> --- a/libavutil/rc4.c
> +++ b/libavutil/rc4.c
> @@ -36,7 +36,7 @@ int av_rc4_init(AVRC4 *r, const uint8_t *key, int key_bits, int decrypt) {
>      uint8_t *state = r->state;
>      int keylen = key_bits >> 3;
>      if (key_bits & 7)
> -        return -1;
> +        return AVERROR(EINVAL);
>      for (i = 0; i < 256; i++)
>          state[i] = i;
>      y = 0;
> --
> 2.6.1
>

pushed


More information about the ffmpeg-devel mailing list