summaryrefslogtreecommitdiff
path: root/libavutil/rc4.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/rc4.c')
-rw-r--r--libavutil/rc4.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/libavutil/rc4.c b/libavutil/rc4.c
index 36b0de9f53..ffcb112142 100644
--- a/libavutil/rc4.c
+++ b/libavutil/rc4.c
@@ -4,20 +4,20 @@
*
* loosely based on LibTomCrypt by Tom St Denis
*
- * This file is part of Libav.
+ * This file is part of FFmpeg.
*
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avutil.h"
@@ -25,13 +25,6 @@
#include "mem.h"
#include "rc4.h"
-#if !FF_API_CRYPTO_CONTEXT
-struct AVRC4 {
- uint8_t state[256];
- int x, y;
-};
-#endif
-
AVRC4 *av_rc4_alloc(void)
{
return av_mallocz(sizeof(struct AVRC4));
@@ -43,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;