summaryrefslogtreecommitdiffstats
path: root/libavcodec/on2avc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/on2avc.c')
-rw-r--r--libavcodec/on2avc.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c
index 60f451c..e5e7cc3 100644
--- a/libavcodec/on2avc.c
+++ b/libavcodec/on2avc.c
@@ -3,20 +3,20 @@
*
* Copyright (c) 2013 Konstantin Shishkov
*
- * 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
*/
@@ -172,7 +172,7 @@ static int on2avc_decode_band_scales(On2AVCContext *c, GetBitContext *gb)
} else {
scale += get_vlc2(gb, c->scale_diff.table, 9, 3) - 60;
}
- if (scale < 0 || scale > 128) {
+ if (scale < 0 || scale > 127) {
av_log(c->avctx, AV_LOG_ERROR, "Invalid scale value %d\n",
scale);
return AVERROR_INVALIDDATA;
@@ -313,7 +313,7 @@ static void zero_head_and_tail(float *src, int len, int order0, int order1)
}
static void pretwiddle(float *src, float *dst, int dst_len, int tab_step,
- int step, int order0, int order1, const double **tabs)
+ int step, int order0, int order1, const double * const *tabs)
{
float *src2, *out;
const double *tab;
@@ -341,7 +341,7 @@ static void pretwiddle(float *src, float *dst, int dst_len, int tab_step,
static void twiddle(float *src1, float *src2, int src2_len,
const double *tab, int tab_len, int step,
- int order0, int order1, const double **tabs)
+ int order0, int order1, const double * const *tabs)
{
int steps;
int mask;
@@ -908,6 +908,11 @@ static av_cold int on2avc_decode_init(AVCodecContext *avctx)
On2AVCContext *c = avctx->priv_data;
int i;
+ if (avctx->channels > 2U) {
+ avpriv_request_sample(avctx, "Decoding more than 2 channels");
+ return AVERROR_PATCHWELCOME;
+ }
+
c->avctx = avctx;
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
avctx->channel_layout = (avctx->channels == 2) ? AV_CH_LAYOUT_STEREO
OpenPOWER on IntegriCloud